diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-28 18:25:11 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-28 18:25:11 +0000 |
commit | 4fa887618ecb6fd0aa667f44ef0ef851a2ccfcde (patch) | |
tree | 26de3b5387c1a6fa6024c0c82150e979fc3dd80f /applications/luci-upnp/luasrc/model/cbi/upnp | |
parent | 4b62df0945d1eb7a9f95ff8b4678e07b91480e8a (diff) |
applications/luci-upnp: fix enable checkbox of upnp service
Diffstat (limited to 'applications/luci-upnp/luasrc/model/cbi/upnp')
-rw-r--r-- | applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua | 2 | ||||
-rw-r--r-- | applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua index 8d5a592b11..a485081297 100644 --- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua +++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua @@ -16,6 +16,8 @@ m = Map("upnpd", translate("upnpd"), translate("upnpd_desc")) s = m:section(NamedSection, "config", "upnpd", "") e = s:option(Flag, "enabled", translate("enable")) +e.rmempty = false + function e.write(self, section, value) local cmd = (value == "1") and "enable" or "disable" os.execute("/etc/init.d/miniupnpd " .. cmd) diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua index aaec3b0ccf..8ad03a36a0 100644 --- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua +++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua @@ -16,6 +16,8 @@ m = Map("upnpd", translate("upnpd"), translate("upnpd_desc")) s = m:section(NamedSection, "config", "upnpd", "") e = s:option(Flag, "enabled", translate("enable")) +e.rmempty = false + function e.write(self, section, value) local cmd = (value == "1") and "enable" or "disable" os.execute("/etc/init.d/miniupnpd " .. cmd) |