From ef6b4675d6d9345d631059c08acb26d4de882a40 Mon Sep 17 00:00:00 2001 From: Erik Tews Date: Mon, 9 Feb 2015 06:00:15 +0100 Subject: [PATCH] autoupdater: Timeout for wget. Added a 120 second timeout for wget to prevent it from stalling forever. --- admin/autoupdater/files/usr/sbin/autoupdater | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/autoupdater/files/usr/sbin/autoupdater b/admin/autoupdater/files/usr/sbin/autoupdater index 4211dd1..2cdd91c 100755 --- a/admin/autoupdater/files/usr/sbin/autoupdater +++ b/admin/autoupdater/files/usr/sbin/autoupdater @@ -125,7 +125,7 @@ local function read_manifest(mirror) -- Read all lines from the manifest -- The upper part is saves to lines, the lower part to sigs - for line in io.popen(string.format("wget -O- '%s/%s.manifest'", mirror, branch.name), 'r'):lines() do + for line in io.popen(string.format("wget -T 120 -O- '%s/%s.manifest'", mirror, branch.name), 'r'):lines() do if not sep then if line == '---' then sep = true @@ -188,7 +188,7 @@ end -- Downloads the firmware image from a mirror to a given output file local function fetch_firmware(mirror, filename, output) - if os.execute(string.format("wget -O '%s' '%s/%s'", output, mirror, filename)) ~= 0 then + if os.execute(string.format("wget -T 120 -O '%s' '%s/%s'", output, mirror, filename)) ~= 0 then io.stderr:write('Error downloading the image from ' .. mirror .. '\n') return false end