luci-0.9: flush stdout during sysupgrade
This commit is contained in:
parent
d9e011d7cb
commit
a710515dac
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue