From: Jo-Philipp Wich Date: Sat, 27 Mar 2010 02:02:51 +0000 (+0000) Subject: luci-0.9: flush stdout during sysupgrade X-Git-Tag: 0.9.0~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a710515dac192de1b4c564458ba7d977a9198bae;p=oweals%2Fluci.git luci-0.9: flush stdout during sysupgrade --- diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index 75f06f9b7..6f2279d0a 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -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 diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua index 075f51e91..481fbf0f0 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -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