aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-12-31 10:34:29 +0100
committerPetr Štetiar <ynezz@true.cz>2020-01-05 17:50:10 +0100
commitbf99f7920012a1b45e9e6d094e9ac1bcd1f7d931 (patch)
treeb4236659662d838e994498bd3f6b91ed19494796 /package/base-files/files
parent3140d380422e3b6416b5dbdc951f90b006a4eaac (diff)
downloadupstream-bf99f7920012a1b45e9e6d094e9ac1bcd1f7d931.tar.gz
upstream-bf99f7920012a1b45e9e6d094e9ac1bcd1f7d931.tar.bz2
upstream-bf99f7920012a1b45e9e6d094e9ac1bcd1f7d931.zip
base-files: sysupgrade: exit if the firmware download failed
Sysupgrade process shouldn't continue if the firmware image couldn't be downloaded. Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020940.html Reported-by: Petr Novák <petrn@me.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit cf3da66d2ce11a30ae2993b56276ade10c9bddb9)
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 935d08048e..6c518b780e 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -294,7 +294,7 @@ type platform_check_image >/dev/null 2>/dev/null || {
case "$IMAGE" in
http://*|\
https://*)
- wget -O/tmp/sysupgrade.img "$IMAGE"
+ wget -O/tmp/sysupgrade.img "$IMAGE" || exit 1
IMAGE=/tmp/sysupgrade.img
;;
esac