diff options
-rw-r--r-- | libs/sgi-cgi/luasrc/sgi/cgi.lua | 1 | ||||
-rw-r--r-- | libs/sys/luasrc/sys.lua | 14 |
2 files changed, 3 insertions, 12 deletions
diff --git a/libs/sgi-cgi/luasrc/sgi/cgi.lua b/libs/sgi-cgi/luasrc/sgi/cgi.lua index d36d43fb5..f78adeaed 100644 --- a/libs/sgi-cgi/luasrc/sgi/cgi.lua +++ b/libs/sgi-cgi/luasrc/sgi/cgi.lua @@ -61,6 +61,7 @@ function run() elseif id == 4 then io.write(data1) elseif id == 5 then + io.close() active = false end end 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 |