Disable buffering of sysupgrade output
[project/luci.git] / libs / sys / luasrc / sys.lua
index 9b68a25..02cea5e 100644 (file)
@@ -70,6 +70,8 @@ function flash(image, kpattern)
        cmd = cmd .. "'" .. image:gsub("'", "") .. "' 2>/dev/null"
 
        local fp = io.popen(cmd)
+       fp:setvbuf("no")
+       
        local line = fp:read()
        
        if line == "Invalid image type" then
@@ -77,12 +79,12 @@ function flash(image, kpattern)
                return false, line
        else
                line = fp:read()
-               if line == "Performing system upgrade" then
+               if line == "Performing system upgrade..." then
                        return true
                end
                
                line = fp:read()
-               if line == "Performing system upgrade" then
+               if line == "Performing system upgrade..." then
                        return true
                end