libs/sys: fix luci.sys.init.index() (#399)
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 6 May 2012 09:47:57 +0000 (09:47 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 6 May 2012 09:47:57 +0000 (09:47 +0000)
libs/sys/luasrc/sys.lua

index 7906d2b..54f7f2b 100644 (file)
@@ -795,7 +795,7 @@ end
 -- @return             Numeric index value
 function init.index(name)
        if fs.access(init.dir..name) then
-               return call("env -i sh -c 'source %s%s; exit $START' >/dev/null"
+               return call("env -i sh -c 'source %s%s enabled; exit ${START:-255}' >/dev/null"
                        %{ init.dir, name })
        end
 end