applications/luci-upnp: OpenWrt r18491 changes the enable/disable behaviour, adept...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 4 Dec 2009 23:16:06 +0000 (23:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 4 Dec 2009 23:16:06 +0000 (23:16 +0000)
applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua

index 02fbfd6018f03372d8a54f4b659ce8ea5aba23db..57fa1ae4c8e5e84966a2be64ad5c56b4f074fccd 100644 (file)
@@ -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
index 4ca72ef0d08f96a955858c59fb292433e5fc5624..3f1ba3035a18304bfd90fcb21138bc78a02e4ed5 100644 (file)
@@ -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