summaryrefslogtreecommitdiffhomepage
path: root/libs/sys/luasrc/sys.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-12 13:32:35 +0000
committerSteven Barth <steven@midlink.org>2008-09-12 13:32:35 +0000
commitdf723f9d9e858d56cdf4cd2fee15e1549a353ad0 (patch)
tree087cf61874c341076396ad99b309055d32fec86a /libs/sys/luasrc/sys.lua
parentbf7287c60d3819ee2322c47d191d01e55a1ec909 (diff)
Avoid some blocking issues
Diffstat (limited to 'libs/sys/luasrc/sys.lua')
-rw-r--r--libs/sys/luasrc/sys.lua14
1 files changed, 2 insertions, 12 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index 02cea5e91d..cf7fbc05f8 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