From e6efc9671a2cccce908340bcd6637cfccbdcb7e1 Mon Sep 17 00:00:00 2001 From: Robert Langhammer Date: Sun, 17 Apr 2022 00:31:42 +0200 Subject: [PATCH] fff-web-ui: fix redirection of stderr The stderr of batctl should be redirected. In a row of pipes a redirection at the end will only redirect the output of the last command! Put it on the right place. It's just shell grammar. Signed-off-by: Robert Langhammer Reviewed-by: Christian Dresel --- .../fff/fff-web-ui/files/www/public/cgi-bin/status.html | 4 ++-- src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packages/fff/fff-web-ui/files/www/public/cgi-bin/status.html b/src/packages/fff/fff-web-ui/files/www/public/cgi-bin/status.html index aed86b5c..21555ec3 100755 --- a/src/packages/fff/fff-web-ui/files/www/public/cgi-bin/status.html +++ b/src/packages/fff/fff-web-ui/files/www/public/cgi-bin/status.html @@ -61,8 +61,8 @@ contact="$(uci -q get "fff.system.contact")" Status - - + +
Hood:<% echo "$hood" %>
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) %>
Bekannte Knoten:<% echo -n $(($(batctl tg -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l)+1)) %>
Nachbarknoten:<% echo -n $(batctl o -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l) %>
Lokale Clients:<% echo -n $(batctl tl -H 2> /dev/null | grep -c 'W') %>
diff --git a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html index 3d4ce378..88bf3efa 100755 --- a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html +++ b/src/packages/fff/fff-web-ui/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-client/address) %> - 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) %> + Bekannte Knoten:<%= $(($(batctl tg -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l)+1)) %> + Nachbarknoten:<%= $(batctl o -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l) %> VPN via fastd:<%= ${vpn_active} %> fastd public key:<%= ${fastd_pub} %> Laufzeit:<%= ${uptime} %>