aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/sysupgrade
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 14:13:01 +0100
commitcf3da66d2ce11a30ae2993b56276ade10c9bddb9 (patch)
tree9adf67fec2eb7161a50fce4e1844f944789fc5e7 /package/base-files/files/sbin/sysupgrade
parent411a666df279eb44488be4c3a6d59228b87e3957 (diff)
downloadupstream-cf3da66d2ce11a30ae2993b56276ade10c9bddb9.tar.gz
upstream-cf3da66d2ce11a30ae2993b56276ade10c9bddb9.tar.bz2
upstream-cf3da66d2ce11a30ae2993b56276ade10c9bddb9.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>
Diffstat (limited to 'package/base-files/files/sbin/sysupgrade')
-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