forked from freifunk-franken/firmware
fff-nodewatcher: Use mac address instead of standard node name
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
parent
fd41c72013
commit
0d3d6f7f33
|
@ -56,6 +56,8 @@ crawl() {
|
||||||
#Get system data from other locations
|
#Get system data from other locations
|
||||||
err "$(date): Collecting basic system status data"
|
err "$(date): Collecting basic system status data"
|
||||||
hostname="$(cat /proc/sys/kernel/hostname)"
|
hostname="$(cat /proc/sys/kernel/hostname)"
|
||||||
|
mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null)
|
||||||
|
[ "$hostname" = "LEDE" ] && hostname="$mac"
|
||||||
description="$(uci get system.@system[0].description)"
|
description="$(uci get system.@system[0].description)"
|
||||||
if [ -n "$description" ]; then
|
if [ -n "$description" ]; then
|
||||||
description="<description><![CDATA[$description]]></description>"
|
description="<description><![CDATA[$description]]></description>"
|
||||||
|
|
Loading…
Reference in New Issue