luci-0.11: merge r9571 - r9573
[project/luci.git] / applications / luci-upnp / luasrc / model / cbi / upnp / upnpmini.lua
index 3e19b9573447356fabac0caade650bf367a8a4ea..3f1ba3035a18304bfd90fcb21138bc78a02e4ed5 100644 (file)
@@ -12,25 +12,15 @@ 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(Value, "download", nil, "kByte/s").rmempty = true
-s:option(Value, "upload", nil, "kByte/s").rmempty = true
+s:option(Value, "download", translate("Downlink"), "kByte/s").rmempty = true
+s:option(Value, "upload", translate("Uplink"), "kByte/s").rmempty = true
 
 return m