0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 19:13:49 +01:00

Amend last commit.

This commit is contained in:
Wouter R 2013-11-29 20:47:17 +01:00
parent 042f33c11a
commit 25c0c1a1fa

View File

@ -76,10 +76,12 @@ function M.logfiles(request, response)
-- copy relevant openwrt configuration files -- copy relevant openwrt configuration files
rv,msg = lfs.mkdir(LOG_COLLECT_DIR .. '/config') rv,msg = lfs.mkdir(LOG_COLLECT_DIR .. '/config')
for _,v in pairs(UCI_CONFIG_FILES_TO_SAVE) do for _,v in pairs(UCI_CONFIG_FILES_TO_SAVE) do
local srcFile = '/etc/config/' .. v
local tgtFile = LOG_COLLECT_DIR .. '/config/' .. v local tgtFile = LOG_COLLECT_DIR .. '/config/' .. v
rv,sig,code = redirectedExecute('cp ' .. '/etc/config/' .. v .. ' ' .. tgtFile) if v ~= 'wireless' then
if v == 'wireless' then rv,sig,code = redirectedExecute('cp ' .. srcFile .. ' ' .. tgtFile)
rv,sig,code = os.execute("sed \"s/option key '.*'/option key '...'/g\" " .. tgtFile .. " > " .. tgtFile .. '.2') else
rv,sig,code = os.execute("sed \"s/option key '.*'/option key '...'/g\" " .. srcFile .. " > " .. tgtFile)
end end
end end