From a710515dac192de1b4c564458ba7d977a9198bae Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 27 Mar 2010 02:02:51 +0000 Subject: [PATCH] luci-0.9: flush stdout during sysupgrade --- modules/admin-full/luasrc/controller/admin/system.lua | 2 ++ modules/admin-mini/luasrc/controller/mini/system.lua | 2 ++ 2 files changed, 4 insertions(+) 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 -- 2.25.1