modules/admin-full: disambiguate NTP client/server settings
[project/luci.git] / modules / admin-full / luasrc / model / cbi / admin_system / startup.lua
index a0c72ca..592c173 100644 (file)
@@ -2,7 +2,7 @@
 LuCI - Lua Configuration Interface
 
 Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
+Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
 Copyright 2010 Manuel Munz <freifunk at somakoma dot de>
 
 Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,11 +24,13 @@ for _, name in ipairs(luci.sys.init.names()) do
        local index   = luci.sys.init.index(name)
        local enabled = luci.sys.init.enabled(name)
 
-       inits["%02i.%s" % { index, name }] = {
-               name    = name,
-               index   = tostring(index),
-               enabled = enabled
-       }
+       if index < 255 then
+               inits["%02i.%s" % { index, name }] = {
+                       name    = name,
+                       index   = tostring(index),
+                       enabled = enabled
+               }
+       end
 end
 
 
@@ -71,7 +73,7 @@ end
 start = s:option(Button, "start", translate("Start"))
 start.inputstyle = "apply"
 start.write = function(self, section)
-       luci.sys.call("/etc/init.d/%s %s" %{ inits[section].name, self.option })
+       luci.sys.call("/etc/init.d/%s %s >/dev/null" %{ inits[section].name, self.option })
 end
 
 restart = s:option(Button, "restart", translate("Restart"))