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:
Adrian Schmutzler 2017-10-03 01:04:07 +02:00 committed by Tim Niemeyer
parent fd41c72013
commit 0d3d6f7f33
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,8 @@ crawl() {
#Get system data from other locations
err "$(date): Collecting basic system status data"
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)"
if [ -n "$description" ]; then
description="<description><![CDATA[$description]]></description>"