summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-upnp/luasrc/model/cbi/upnp
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-12-04 23:16:06 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-12-04 23:16:06 +0000
commita6860ba0c85194f638832de1ce9aa6d27689db08 (patch)
tree5cb5471cd3cb20775ae7a52bce23ee8e7799f0d6 /applications/luci-upnp/luasrc/model/cbi/upnp
parentb2a7b2497806ac300b24a618279bd08a072903c2 (diff)
applications/luci-upnp: OpenWrt r18491 changes the enable/disable behaviour, adept to it
Diffstat (limited to 'applications/luci-upnp/luasrc/model/cbi/upnp')
-rw-r--r--applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua12
-rw-r--r--applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua12
2 files changed, 0 insertions, 24 deletions
diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
index 02fbfd6018..57fa1ae4c8 100644
--- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
+++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
@@ -20,18 +20,6 @@ s.addremove = false
e = s:option(Flag, "enabled", translate("enable"))
e.rmempty = false
-function e.write(self, section, value)
- local cmd = (value == "1") and "enable" or "disable"
- if value ~= "1" then
- os.execute("/etc/init.d/miniupnpd stop")
- end
- os.execute("/etc/init.d/miniupnpd " .. cmd)
-end
-
-function e.cfgvalue(self, section)
- return (os.execute("/etc/init.d/miniupnpd enabled") == 0) and "1" or "0"
-end
-
s:option(Flag, "secure_mode", translate("Enable secure mode")).rmempty = true
s:option(Flag, "log_output", translate("Log output")).rmempty = true
s:option(Value, "download", translate("Downlink"), "kByte/s").rmempty = true
diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua
index 4ca72ef0d0..3f1ba3035a 100644
--- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua
+++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua
@@ -20,18 +20,6 @@ s.addremove = false
e = s:option(Flag, "enabled", translate("enable"))
e.rmempty = false
-function e.write(self, section, value)
- local cmd = (value == "1") and "enable" or "disable"
- if value ~= "1" then
- os.execute("/etc/init.d/miniupnpd stop")
- end
- os.execute("/etc/init.d/miniupnpd " .. cmd)
-end
-
-function e.cfgvalue(self, section)
- return (os.execute("/etc/init.d/miniupnpd enabled") == 0) and "1" or "0"
-end
-
s:option(Value, "download", translate("Downlink"), "kByte/s").rmempty = true
s:option(Value, "upload", translate("Uplink"), "kByte/s").rmempty = true