Skip to content
Snippets Groups Projects
Commit 004b386d authored by Adrian Schmutzler's avatar Adrian Schmutzler
Browse files

nodewatcher: Remove leftover use of batman-adv sysfs

In d9ec8edb ("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: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: default avatarRobert Langhammer <rlanghammer@web.de>
parent ca40d2d7
No related branches found
No related tags found
No related merge requests found
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment