base-files: sysupgrade: exit if the firmware download failed
[openwrt/staging/mkresin.git] / package / base-files / files / sbin / sysupgrade
index 935d08048e81c8c231301ac20647d340f102f930..6c518b780eddd973966537b50d8f7c82539bb1e1 100755 (executable)
@@ -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