diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html index b785aed..26acb8a 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html @@ -9,7 +9,7 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then regex=$regex'(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$' if [ "${#POST_hostname}" -ge "255" ] ; then MSG='Knotenname ist länger als 255 Zeichen!' - elif ! echo -n "$POST_hostname" | egrep -q "$regex"; then + elif ! echo -n "$POST_hostname" | egrep -q "$regex"; then MSG='Knotenname enthält ungültige Zeichen!' else # Allgemeine Einstellungen @@ -33,11 +33,32 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then fi uci -q set "fff.trafficcontrol.limit_in=${POST_limit_ingress}" uci -q set "fff.trafficcontrol.limit_out=${POST_limit_egress}" - + uci -q set "simple-tc.example.ifname=wan" uci -q set "simple-tc.example.limit_ingress=${POST_limit_ingress}" uci -q set "simple-tc.example.limit_egress=${POST_limit_egress}" + # Restliche Einstellungen + uci -q set "fff.notifyupdate=webui" + if [ "$POST_upgrade_notification" == "on" ] ; then + uci -q set "fff.notifyupdate.value=1" + else + uci -q set "fff.notifyupdate.value=0" + rm -f /tmp/fwcheck + rm -f /tmp/isupdate + fi + + if uci -q get system.poe_passthrough > /dev/null ; then + uci -q set "fff.poe_passthrough=fff" + if [ "$POST_poe_passthrough" == "on" ] ; then + uci -q set "fff.poe_passthrough.active=1" + uci -q set "system.poe_passthrough.value=1" + else + uci -q set "fff.poe_passthrough.active=0" + uci -q set "system.poe_passthrough.value=0" + fi + fi + uci -q commit MSG='Daten gespeichert! - Bitte Router neustarten.' @@ -48,11 +69,17 @@ fi <%in /www/ssl/cgi-bin/helpers %> <% # read -if [ "$(uci -q get 'fff.trafficcontrol.enabled')" == "1" ] ; then - traffic_checked='checked="checked" ' +chkd='checked="checked" ' +if [ "$(uci -q get 'fff.trafficcontrol.enabled')" == "1" ] ; then # not set=0 + traffic_checked="$chkd" else traffic_checked="" fi +if [ "$(uci -q get 'fff.notifyupdate.value')" == "0" ] ; then # not set=1 + upgrade_checked="" +else + upgrade_checked="$chkd" +fi %> <% show_msg %>
@@ -74,8 +101,9 @@ fi E-Mail Adresse: +

-
+
Bitratenbegrenzung
Aktiviert: @@ -85,8 +113,29 @@ fi
Freifunk Upload:kbit/s
+
+ Weitere Einstellungen + + + + <% + if uci -q get system.poe_passthrough > /dev/null ; then + if [ "$(uci -q get 'fff.poe_passthrough.active')" == "1" ] ; then # not set=0 + poe_pt_checked="$chkd" + else + poe_pt_checked="" + fi + %> + + <% fi %> + +
Show upgrade notification: + /> +
Enable PoE passthrough: + /> +
+
-

<%in /www/ssl/cgi-bin/footer %>