libs/sys: fix luci.sys.init.index() (#399)

This commit is contained in:
Jo-Philipp Wich 2012-05-06 09:47:57 +00:00
parent 98bf018c1b
commit 216264b6e4

View 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