Hi,
This patch fix the autoupdater url error message. If the mirror url inside the site.conf ends with "/". The autoupdater will add additionally a "/" without checking. This patch add a check of endig urls.
--- admin/autoupdater/files/usr/sbin/autoupdater | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/admin/autoupdater/files/usr/sbin/autoupdater b/admin/autoupdater/files/usr/sbin/autoupdater index be3e393..716fce4 100755 --- a/admin/autoupdater/files/usr/sbin/autoupdater +++ b/admin/autoupdater/files/usr/sbin/autoupdater @@ -188,9 +188,15 @@ local function read_manifest(mirror) return ret end
+function string.ends(String,End) + return End=='' or string.sub(String,-string.len(End))==End +end
-- Downloads the firmware image from a mirror to a given output file local function fetch_firmware(mirror, filename, output) + if string.ends(mirror, "/") then + mirror = string.sub(mirror,1,-2) + end if autoupdater_util.exec('wget', '-T', '120', '-O', output, mirror .. '/' .. filename) ~= 0 then io.stderr:write('Error downloading the image from ' .. mirror .. '\n') return false