applications/luci-upnp: OpenWrt r18491 changes the enable/disable behaviour, adept to it

This commit is contained in:
Jo-Philipp Wich 2009-12-04 23:16:06 +00:00
parent b2a7b24978
commit a6860ba0c8
2 changed files with 0 additions and 24 deletions

View 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

View 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