From f23745b1466ef293b43544902cd90a7ca4f09209 Mon Sep 17 00:00:00 2001 From: mvoelkel Date: Fri, 11 Sep 2015 14:53:05 +0200 Subject: [PATCH] Systemsettings html/scripts Use layered help in system.html Added "strict" to systemsettings check strict.enabled in octoserve startup script --- .../octonet/overlay/etc/init.d/S99octo | 6 +- octoserve/var/www/system.html | 309 +++++++++++------- octoserve/var/www/systemsettings.lua | 16 +- 3 files changed, 214 insertions(+), 117 deletions(-) diff --git a/buildroot.octonet/board/digitaldevices/octonet/overlay/etc/init.d/S99octo b/buildroot.octonet/board/digitaldevices/octonet/overlay/etc/init.d/S99octo index 09fa397..600e85c 100755 --- a/buildroot.octonet/board/digitaldevices/octonet/overlay/etc/init.d/S99octo +++ b/buildroot.octonet/board/digitaldevices/octonet/overlay/etc/init.d/S99octo @@ -20,7 +20,11 @@ case "$1" in "$0" startoctoserve ;; startoctoserve) - octoserve > /dev/null 2>&1 & + export OPTIONS="" + if [ -e /config/strict.enabled ]; then + export OPTIONS=$OPTIONS" -c" + fi + octoserve $OPTIONS > /dev/null 2>&1 & ;; stopoctoserve) killall octoserve diff --git a/octoserve/var/www/system.html b/octoserve/var/www/system.html index 2d21339..85b681e 100644 --- a/octoserve/var/www/system.html +++ b/octoserve/var/www/system.html @@ -1,7 +1,7 @@ - + OctopusNet @@ -24,6 +24,8 @@ function SaveSettings() param += "nodvbt=" + (nodvbtEnabled?"1":"0"); param += "&"; param += "noswitch=" + (noswitchEnabled?"1":"0"); + param += "&"; + param += "strict=" + (strictEnabled?"1":"0"); location.replace('/systemsettings.lua?'+param); } @@ -34,6 +36,7 @@ function ClearSettings() nodmsEnabled = false; nodvbtEnabled = false; noswitchEnabled = false; + strictEnabled = false; SaveSettings(); } @@ -44,6 +47,7 @@ function OnLoad() document.getElementById("NODMSButton").checked = nodmsEnabled; document.getElementById("NODVBTButton").checked = nodvbtEnabled; document.getElementById("NOSwitchButton").checked = noswitchEnabled; + document.getElementById("STRICTButton").checked = strictEnabled; } function Change() @@ -53,6 +57,7 @@ function Change() nodmsEnabled = document.getElementById("NODMSButton").checked; nodvbtEnabled = document.getElementById("NODVBTButton").checked; noswitchEnabled = document.getElementById("NOSwitchButton").checked; + strictEnabled = document.getElementById("STRICTButton").checked; document.getElementById("SetButton").disabled = false; } @@ -71,6 +76,15 @@ function SetPassword() location.replace('/setpasswd.lua?'+pwd1); } +function ToggleHelp(id) +{ + var el = document.getElementById(id); + if( el.style.display == "none") + el.style.display = "block"; + else + el.style.display = "none"; +} + @@ -87,121 +101,192 @@ function SetPassword() -
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Layer 2 Quality of Service -
- -
-
See note below
Telnet -
- -
-
Enable it at your own risk
NODMS -
- -
-
Disable DMS announcement.
NODVBT -
- -
-
Disable DVBT announcement.
No DVB switch -
- -
-
Disable DVB switch emulation on S8.
-
+
+ + + + - -
Layer 2 Quality of Service
- - - +
- -
+
See note: + English + Deutsch +
Telnet +
+ +
+
Enable it at your own risk
Disable DMS announcement +
+ +
+
Disable DVBT announcement +
+ +
+
Enforce strict SAT>IP +
+ +
+
See note: + English + Deutsch +
Disable multiswitch emulation +
+ +
+
See note: + English + Deutsch +
+
+
+ + + +
+
+
+

- -
-

Layer 2 Quality of Service

- This is defined in the IEEE 802.1Q VLAN standard, and provides QoS in a local network.
- For it to work all components in the LAN must either be transparent to it or need to support it. -
  • hubs: always transparent.
  • -
  • dumb switches: usually transparent, better ones use it to prioritise the traffic.
  • -
  • smart switches: depends on setting.
  • -
  • PCs and the like: newer systems support it by default, for older systems check the LAN adapter settings.
  • -
  • WLAN access points: depends on firmware and model. OpenWRT based devices usually work.
  • -
    - Dies ist im IEEE 802.1Q VLAN Standard definiert und erlaubt QoS im lokalem Netz.
    - Damit es funktioniert müssen alle Netzwerkkompenenten im LAN entweder transparent sein oder es unterstützen. -
  • Hubs: sind immer transparent
  • -
  • Dumb Switches: normalerweise transparent, bessere prioritisieren damit den Datenverkehr
  • -
  • Smart Switches: hängt von den Einstellungen ab
  • -
  • PCs und dergleichen: neue Systeme unterstützten es defaultmässig, für ältere in den Einstellungen der Netzwerkarte nachschauen
  • -
  • WLAN Accesspoints: hängt von Modell und deren Firmware ab. OpenWRT basierte Geräte unterstützen es normalerweise
  • + + + + + + +
    diff --git a/octoserve/var/www/systemsettings.lua b/octoserve/var/www/systemsettings.lua index 3467a14..6e5344b 100644 --- a/octoserve/var/www/systemsettings.lua +++ b/octoserve/var/www/systemsettings.lua @@ -71,17 +71,18 @@ if query ~= "" then name,value = string.match(v,"(%w+)%=(%d+)") if( WriteSetting(name,value == "1") ) then if name == "telnet" then - os.rename("/etc/securetty","/etc/securetty.bak"); -- temp fix to allow root login on telnet +--~ os.rename("/etc/securetty","/etc/securetty.bak"); -- temp fix to allow root login on telnet os.execute("/etc/init.d/S91telnet restart") end if name == "vlan" then restart = 1 end if name == "nodms" then restart = 1 end if name == "nodvbt" then restart = 1 end if name == "noswitch" then restart = 1 end - nextloc = "wait.html?5" + if name == "strict" then restart = 1 end + nextloc = "wait.html?10" end end - if restart == 1 then os.execute("/etc/init.d/S99octo restartoctonet&") end + if restart == 1 then os.execute("/etc/init.d/S99octo restartoctonet > /dev/null 2>&1 &") end print(proto.." 303") print("Location: http://"..host.."/"..nextloc) print("") @@ -121,7 +122,14 @@ else else print("noswitchEnabled = false;") end - + + if ReadSetting("strict") then + print("strictEnabled = true;") + else + print("strictEnabled = false;") + end + + end