From df723f9d9e858d56cdf4cd2fee15e1549a353ad0 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 12 Sep 2008 13:32:35 +0000 Subject: Avoid some blocking issues --- libs/sys/luasrc/sys.lua | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'libs/sys') diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index 02cea5e91..cf7fbc05f 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -67,7 +67,7 @@ function flash(image, kpattern) if kpattern then cmd = cmd .. "-k '" .. kpattern:gsub("'", "") .. "' " end - cmd = cmd .. "'" .. image:gsub("'", "") .. "' 2>/dev/null" + cmd = cmd .. "'" .. image:gsub("'", "") .. "' 2>/dev/null &" local fp = io.popen(cmd) fp:setvbuf("no") @@ -78,18 +78,8 @@ function flash(image, kpattern) fp:close() return false, line else - line = fp:read() - if line == "Performing system upgrade..." then - return true - end - - line = fp:read() - if line == "Performing system upgrade..." then - return true - end - fp:close() - return false, line + return true end end -- cgit v1.2.3