diff --git a/src/packages/fff/fff-hoods/files/lib/functions/fff/evalhoodinfo b/src/packages/fff/fff-hoods/files/lib/functions/fff/evalhoodinfo
new file mode 100644
index 0000000..c487ea7
--- /dev/null
+++ b/src/packages/fff/fff-hoods/files/lib/functions/fff/evalhoodinfo
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright 2017 Adrian Schmutzler
+# License GPLv3
+
+. /lib/functions/fff/keyxchange
+
+jsonfile="$(getJsonPath)"
+if [ -n "$jsonfile" ] ; then
+ json_load "$(cat "$jsonfile")"
+ json_select hood
+ json_get_var mesh_type2 mesh_type2
+ json_get_var mesh_type5 mesh_type5
+ json_get_var chan2ghz channel2
+ json_get_var chan5ghz channel5
+ json_get_var essid essid
+else
+ mesh_type2="-"
+ mesh_type5="-"
+ chan2ghz="-"
+ chan5ghz="-"
+ essid="-"
+fi
+
+real_chan2ghz="--"
+real_chan5ghz="--"
+real_essid="-"
+if uci -q get wireless.w2ap > /dev/null ; then
+ radio2="$(uci -q get wireless.w2ap.device)"
+ real_chan2ghz="$(uci -q get "wireless.${radio2}.channel")"
+ real_essid="$(uci -q get wireless.w2ap.ssid)"
+fi
+if uci -q get wireless.w5ap > /dev/null ; then
+ radio5="$(uci -q get wireless.w5ap.device)"
+ real_chan5ghz="$(uci -q get "wireless.${radio5}.channel")"
+ real_essid="$(uci -q get wireless.w5ap.ssid)"
+fi
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 7931ea9..21bd4e7 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
@@ -1,7 +1,8 @@
#!/usr/bin/haserl
<%
-. /lib/functions/fff/keyxchange
+# read from keyxchangev2data
+. /lib/functions/fff/evalhoodinfo
# prepare
if [ "$REQUEST_METHOD" == "POST" ] ; then
@@ -49,23 +50,10 @@ else
internet_active="Nein"
fi
-# read from keyxchangev2data
-. /lib/functions/fff/keyxchange
-jsonfile="$(getJsonPath)"
-if [ -n "$jsonfile" ] ; then
- json_load "$(cat "$jsonfile")"
- json_select hood
- json_get_var mesh_type2 mesh_type2
- json_get_var mesh_type5 mesh_type5
-else
- mesh_type2="-"
- mesh_type5="-"
-fi
-
%>
- |
-
-
-
- Firmware Version: | <%= ${FIRMWARE_VERSION} %> |
- OpenWrt Version: | <%= ${DISTRIB_DESCRIPTION} %> |
- Kernel Version: | <% uname -s -m -r %> |
- Batman-Adv Version: | <% cat /sys/module/batman_adv/version 2>/dev/null %> |
- Fastd Version: | <% fastd --version 2> /dev/null | cut -d' ' -f 2 %> |
-
-
-
- |
-
-
+
Nutzer: | <% cat /sys/kernel/debug/batman_adv/bat0/transtable_local 2> /dev/null | grep -c 'W' %> |
@@ -116,7 +79,31 @@ fi
|
-
+
+
+
+ Firmware Version: | <%= ${FIRMWARE_VERSION} %> |
+ OpenWrt Version: | <%= ${DISTRIB_DESCRIPTION} %> |
+ Kernel Version: | <% uname -s -m -r %> |
+ Batman-Adv Version: | <% cat /sys/module/batman_adv/version 2>/dev/null %> |
+ Fastd Version: | <% fastd --version 2> /dev/null | cut -d' ' -f 2 %> |
+
+
+
+
Internet vorhanden: | <%= ${internet_active} %> |
|