X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-upnp%2Fluasrc%2Fmodel%2Fcbi%2Fupnp%2Fupnp.lua;h=57fa1ae4c8e5e84966a2be64ad5c56b4f074fccd;hb=a6860ba0c85194f638832de1ce9aa6d27689db08;hp=97fe88e6c20364be6ad12ff6a4c24a2989a90fef;hpb=d5003fc23a5e4889dce39be8991080516e53483c;p=project%2Fluci.git diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua index 97fe88e6c..57fa1ae4c 100644 --- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua +++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua @@ -12,27 +12,17 @@ You may obtain a copy of the License at $Id$ ]]-- -m = Map("upnpd", translate("upnpd"), translate("upnpd_desc")) +m = Map("upnpd", translate("Universal Plug & Play"), translate("UPNP allows clients in the local network to automatically configure the router.")) s = m:section(NamedSection, "config", "upnpd", "") +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").rmempty = true -s:option(Flag, "log_output").rmempty = true -s:option(Value, "download", nil, "kByte/s").rmempty = true -s:option(Value, "upload", nil, "kByte/s").rmempty = true +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 +s:option(Value, "upload", translate("Uplink"), "kByte/s").rmempty = true return m