From 4fa887618ecb6fd0aa667f44ef0ef851a2ccfcde Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 28 Jan 2009 18:25:11 +0000 Subject: applications/luci-upnp: fix enable checkbox of upnp service --- applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua | 2 ++ applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua | 2 ++ 2 files changed, 4 insertions(+) (limited to 'applications/luci-upnp/luasrc') diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua index 8d5a592b1..a48508129 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 aaec3b0cc..8ad03a36a 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) -- cgit v1.2.3