luci-base: sys.lua: fix init script enable action
authorJo-Philipp Wich <jo@mein.io>
Thu, 12 Sep 2019 16:56:24 +0000 (18:56 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 12 Sep 2019 16:56:24 +0000 (18:56 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/sys.lua

index d0df275724df991420703c9077800df7c2b02c77..5aede84848edbe875079d3fabe3e908329a58278 100644 (file)
@@ -189,7 +189,7 @@ local function _nethints(what, callback)
                        end
                end
        )
-       
+
        cur:foreach("dhcp", "odhcpd",
                function(s)
                        if type(s.leasefile) == "string" and fs.access(s.leasefile) then
@@ -645,7 +645,7 @@ function init.enabled(name)
 end
 
 function init.enable(name)
-       return (init_action("enable", name) == 1)
+       return (init_action("enable", name) == 0)
 end
 
 function init.disable(name)