0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-06-26 11:31:23 +02:00

More network logging

This commit is contained in:
peteruithoven 2013-10-17 12:08:03 +02:00
parent f4babb5c20
commit 1425d5ef90
2 changed files with 10 additions and 4 deletions

View File

@ -154,7 +154,7 @@ local function init(environment)
s, msg = wifi.init()
if not s then return s, msg end
s, msg = netconf.init(wifi, true)
s, msg = netconf.init(wifi, false)
if not s then return s, msg end
return true

View File

@ -76,9 +76,15 @@ function M.commitComponent(c)
end
function M.reloadComponent(c, silent)
log:info("reloading component '" .. c .. "'")
if silent ~= nil and silent then os.execute('/etc/init.d/' .. c .. ' reload &> /dev/null')
else os.execute('/etc/init.d/' .. c .. ' reload') end
log:info("reloading component '" .. c .. "'")
local cmd = '/etc/init.d/' .. c .. ' reload'
if silent ~= nil and silent then
cmd = cmd .. ' &> /dev/null'
os.execute(cmd)
else
rv = utils.captureCommandOutput(cmd)
log:info(" result reloading component '" .. c .. "': "..utils.dump(rv))
end
end
function M.uciTableSet(config, section, options)