diff --git a/src/packages/fff/fff-nodewatcher/Makefile b/src/packages/fff/fff-nodewatcher/Makefile
index eea86ae..f6bdbb5 100644
--- a/src/packages/fff/fff-nodewatcher/Makefile
+++ b/src/packages/fff/fff-nodewatcher/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-nodewatcher
-PKG_VERSION:=51
-PKG_RELEASE:=1
+PKG_RELEASE:=52
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
index 9d96b07..5e75f03 100755
--- a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
+++ b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
@@ -12,7 +12,7 @@ if ! lock -n "$lockfile"; then
fi
trap "lock -u \"$lockfile\"" INT TERM EXIT
-SCRIPT_VERSION="51"
+SCRIPT_VERSION="52"
#Get the configuration from the uci configuration file
#If it does not exists, then get it from a normal bash file with variables.
@@ -227,14 +227,13 @@ crawl() {
done
# Build a list of direct neighbors
- batman_adv_originators=$(awk \
+ batman_adv_originators=$(/usr/sbin/batctl o -H | awk \
'BEGIN { FS=" "; i=0 } # set the delimiter to " "
- /O/ { next } # ignore lines with O (will remove second line)
- /B/ { next } # ignore line with B (will remove first line)
{ sub("\\(", "", $0) # remove parentheses
sub("\\)", "", $0)
sub("\\[", "", $0)
- sub("\\]:", "", $0)
+ sub("\\]", "", $0)
+ sub("\\*", "", $0)
sub(" ", " ", $0)
o=$1".*"$1 # build a regex to find lines that contains the $1 (=originator) twice
if ($0 ~ o) # filter for this regex (will remove entries without direct neighbor)
@@ -242,24 +241,22 @@ crawl() {
printf ""$1""$3""$4""$2""$5""
i++
}
- }' /sys/kernel/debug/batman_adv/bat0/originators)
+ }')
- batman_adv_gateway_mode=$(batctl gw)
+ batman_adv_gateway_mode=$(/usr/sbin/batctl gw)
- batman_adv_gateway_list=$(awk \
+ batman_adv_gateway_list=$(/usr/sbin/batctl gwl -H | awk \
'BEGIN { FS=" "; i=0 }
- /B.A.T.M.A.N./ { next }
- /Gateway/ { next }
/No gateways/ { next }
{ sub("\\(", "", $0)
sub("\\)", "", $0)
sub("\\[ *", "", $0)
sub("\\]:", "", $0)
- sub("=> ", "true ", $0)
- sub(" ", "false ", $0)
+ sub("\\* ", "true ", $0)
+ sub(" ", "false ", $0)
printf ""$1""$2""$3""$4""$5""$6" "$7" "$8""
i++
- }' /sys/kernel/debug/batman_adv/bat0/gateways)
+ }')
fi
err "$(date): Collecting information about conected clients"
#CLIENTS
diff --git a/src/packages/fff/fff-support/Makefile b/src/packages/fff/fff-support/Makefile
index 73066ad..56e3574 100644
--- a/src/packages/fff/fff-support/Makefile
+++ b/src/packages/fff/fff-support/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-support
-PKG_VERSION:=0.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-support/files/usr/sbin/show_info b/src/packages/fff/fff-support/files/usr/sbin/show_info
index 7a75966..d7ec824 100755
--- a/src/packages/fff/fff-support/files/usr/sbin/show_info
+++ b/src/packages/fff/fff-support/files/usr/sbin/show_info
@@ -98,8 +98,8 @@ echo "-> SYSTEM"
echo "Name: ${HOSTNAME}"
echo "Modell: $(cat /tmp/sysinfo/model 2>/dev/null)"
echo "MAC-Adresse: $(cat /sys/class/net/br-mesh/address)"
-echo "Bekannte Knoten: $((`cat /sys/kernel/debug/batman_adv/bat0/transtable_global | grep '^ [^ ]' | cut -b 39-55 | sort | uniq | wc -l 2>/dev/null`+1))"
-echo "Nachbarknoten: $(cat /sys/kernel/debug/batman_adv/bat0/originators | grep '^[0-9a-f]' | cut -b 37-53 | sort | uniq | wc -l 2>/dev/null)"
+echo "Bekannte Knoten: $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1))"
+echo "Nachbarknoten: $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)"
echo "VPN via fastd: ${vpn_active}"
echo "VPN via L2TP: ${l2tp_active}"
echo "Laufzeit: ${uptime}"
@@ -128,7 +128,7 @@ echo "Fastd Version: $(fastd --version 2> /dev/null | cut -d' ' -f 2)"
echo ""
echo "-> Netz: FREIFUNK"
-echo "Nutzer: $(cat /sys/kernel/debug/batman_adv/bat0/transtable_local 2> /dev/null | grep -c 'W')"
+echo "Nutzer: $(batctl tl -H 2> /dev/null | grep -c 'W')"
echo "Empfangen: $(cat /sys/class/net/br-mesh/statistics/rx_bytes 2> /dev/null | human_bytes)"
echo "Gesendet: $(cat /sys/class/net/br-mesh/statistics/tx_bytes 2> /dev/null | human_bytes)"
echo "IPv4 Adressen: $(addr 4 br-mesh)"
diff --git a/src/packages/fff/fff-web/Makefile b/src/packages/fff/fff-web/Makefile
index 7a3c4e3..9bb10f7 100644
--- a/src/packages/fff/fff-web/Makefile
+++ b/src/packages/fff/fff-web/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-web
-PKG_VERSION:=6
-PKG_RELEASE:=2
+PKG_RELEASE:=7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-web/files/www/public/cgi-bin/status.html b/src/packages/fff/fff-web/files/www/public/cgi-bin/status.html
index 96d657b..88ae192 100755
--- a/src/packages/fff/fff-web/files/www/public/cgi-bin/status.html
+++ b/src/packages/fff/fff-web/files/www/public/cgi-bin/status.html
@@ -61,9 +61,9 @@ contact="$(uci -q get "fff.system.contact")"
Hood: | <% echo "$hood" %> |
- Nachbarknoten: | <% echo -n $(cat /sys/kernel/debug/batman_adv/bat0/originators | grep '^[0-9a-f]' | cut -b 37-53 | sort | uniq | wc -l 2> /dev/null) %> |
- Bekannte Knoten: | <% echo -n $((`cat /sys/kernel/debug/batman_adv/bat0/transtable_global | grep '^ [^ ]' | cut -b 39-55 | sort | uniq | wc -l 2> /dev/null`+1)) %> |
- Lokale Clients: | <% echo -n $(cat /sys/kernel/debug/batman_adv/bat0/transtable_local 2> /dev/null | grep -c 'W') %> |
+ Bekannte Knoten: | <% echo -n $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2> /dev/null)+1)) %> |
+ Nachbarknoten: | <% echo -n $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2> /dev/null) %> |
+ Lokale Clients: | <% echo -n $(batctl tl -H 2> /dev/null | grep -c 'W') %> |
diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html
index 45b618d..4d1cc93 100755
--- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html
+++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html
@@ -59,8 +59,8 @@ fi
Name: | <%= ${HOSTNAME} %> |
Modell: | <% cat /tmp/sysinfo/model 2>/dev/null %> |
MAC-Adresse: | <%= $(cat /sys/class/net/br-mesh/address) %> |
- Bekannte Knoten: | <%= $((`cat /sys/kernel/debug/batman_adv/bat0/transtable_global | grep '^ [^ ]' | cut -b 39-55 | sort | uniq | wc -l 2>/dev/null`+1)) %> |
- Nachbarknoten: | <%= $(cat /sys/kernel/debug/batman_adv/bat0/originators | grep '^[0-9a-f]' | cut -b 37-53 | sort | uniq | wc -l 2>/dev/null) %> |
+ Bekannte Knoten: | <%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %> |
+ Nachbarknoten: | <%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %> |
VPN via fastd: | <%= ${vpn_active} %> |
VPN via L2TP: | <%= ${l2tp_active} %> |
Laufzeit: | <%= ${uptime} %> |
@@ -71,7 +71,7 @@ fi