forked from freifunk-franken/firmware
nodewatcher: Remove leftover use of batman-adv sysfs
In d9ec8edb15
("batman-adv: Move from DEBUGFS to batctl") we
switched from deprecated DEBUGFS to batctl.
Despite debugfs, batctl seems to also have deprecated sysfs
(https://www.open-mesh.org/news/90).
This patch thus replaces a reference to iface_status by the
corresponding batctl command.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
parent
ca40d2d766
commit
004b386d55
|
@ -1,7 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fff-nodewatcher
|
||||
PKG_RELEASE:=53
|
||||
PKG_RELEASE:=54
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ if ! lock -n "$lockfile"; then
|
|||
fi
|
||||
trap "lock -u \"$lockfile\"" INT TERM EXIT
|
||||
|
||||
SCRIPT_VERSION="53"
|
||||
SCRIPT_VERSION="54"
|
||||
|
||||
#Get the configuration from the uci configuration file
|
||||
#If it does not exists, then get it from a normal bash file with variables.
|
||||
|
@ -219,10 +219,9 @@ crawl() {
|
|||
err "$(date): Collecting information from batman advanced and its interfaces"
|
||||
#B.A.T.M.A.N. advanced
|
||||
if [ -f /sys/module/batman_adv/version ]; then
|
||||
for iface in $(grep active /sys/class/net/*/batman_adv/iface_status); do
|
||||
status=${iface#*:}
|
||||
iface=${iface%/batman_adv/iface_status:active}
|
||||
iface=${iface#/sys/class/net/}
|
||||
for iface in $(batctl if | sed 's/ //'); do
|
||||
status=${iface##*:}
|
||||
iface=${iface%%:*}
|
||||
BATMAN_ADV_INTERFACES=$BATMAN_ADV_INTERFACES"<$iface><name>$iface</name><status>$status</status></$iface>"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue