summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-05-21 16:29:31 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-05-21 16:29:31 +0000
commit8431916f7d74ad26529918f8c9732fedaaa311ab (patch)
tree4fe61745ae54e1504dbea635403258516351b69f
parentf9f1b0ea33589bc0b2236eaec01c609360cb9b01 (diff)
libs/sys: redirect stdout to /dev7null when calling initscripts
-rw-r--r--libs/sys/luasrc/sys.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index 53204b10b..f07430474 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -791,7 +791,7 @@ end
-- @return Boolean indicating whether init is enabled
function init.enabled(name)
if fs.access(init.dir..name) then
- return ( call(init.dir..name.." enabled") == 0 )
+ return ( call(init.dir..name.." enabled >/dev/null") == 0 )
end
return false
end
@@ -801,7 +801,7 @@ end
-- @return Numeric index value
function init.index(name)
if fs.access(init.dir..name) then
- return call("source "..init.dir..name.." enabled; exit $START")
+ return call("source "..init.dir..name.." enabled >/dev/null; exit $START")
end
end
@@ -810,7 +810,7 @@ end
-- @return Boolean indicating success
function init.enable(name)
if fs.access(init.dir..name) then
- return ( call(init.dir..name.." enable") == 1 )
+ return ( call(init.dir..name.." enable >/dev/null") == 1 )
end
end
@@ -819,7 +819,7 @@ end
-- @return Boolean indicating success
function init.disable(name)
if fs.access(init.dir..name) then
- return ( call(init.dir..name.." disable") == 0 )
+ return ( call(init.dir..name.." disable >/dev/null") == 0 )
end
end