luci-0.9: flush stdout during sysupgrade

This commit is contained in:
Jo-Philipp Wich 2010-03-27 02:02:51 +00:00
parent d9e011d7cb
commit a710515dac
2 changed files with 4 additions and 0 deletions

View file

@ -244,6 +244,7 @@ function action_upgrade()
if has_platform and has_image and has_support then
-- Mimetype text/plain
luci.http.prepare_content("text/plain")
luci.http.write("Starting luci-flash...\n")
-- Now invoke sysupgrade
local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
@ -256,6 +257,7 @@ function action_upgrade()
local ln = fd:read("*l")
if not ln then break end
luci.http.write(ln .. "\n")
io.flush()
end
fd:close()
end

View file

@ -151,6 +151,7 @@ function action_upgrade()
if has_platform and has_image and has_support then
-- Mimetype text/plain
luci.http.prepare_content("text/plain")
luci.http.write("Starting luci-flash...\n")
-- Now invoke sysupgrade
local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
@ -163,6 +164,7 @@ function action_upgrade()
local ln = fd:read("*l")
if not ln then break end
luci.http.write(ln .. "\n")
io.flush()
end
fd:close()
end