luci-0.9: merge r5605
This commit is contained in:
parent
061213f9cf
commit
e02b2c07b7
2 changed files with 0 additions and 24 deletions
|
@ -18,18 +18,6 @@ s = m:section(NamedSection, "config", "upnpd", "")
|
||||||
e = s:option(Flag, "enabled", translate("enable"))
|
e = s:option(Flag, "enabled", translate("enable"))
|
||||||
e.rmempty = false
|
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").rmempty = true
|
s:option(Flag, "secure_mode").rmempty = true
|
||||||
s:option(Flag, "log_output").rmempty = true
|
s:option(Flag, "log_output").rmempty = true
|
||||||
s:option(Value, "download", nil, "kByte/s").rmempty = true
|
s:option(Value, "download", nil, "kByte/s").rmempty = true
|
||||||
|
|
|
@ -18,18 +18,6 @@ s = m:section(NamedSection, "config", "upnpd", "")
|
||||||
e = s:option(Flag, "enabled", translate("enable"))
|
e = s:option(Flag, "enabled", translate("enable"))
|
||||||
e.rmempty = false
|
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", nil, "kByte/s").rmempty = true
|
s:option(Value, "download", nil, "kByte/s").rmempty = true
|
||||||
s:option(Value, "upload", nil, "kByte/s").rmempty = true
|
s:option(Value, "upload", nil, "kByte/s").rmempty = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue