From d39cdf2b2743b3be435048a3735329de05c735d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Tue, 31 Dec 2019 10:34:29 +0100 Subject: [PATCH] base-files: sysupgrade: exit if the firmware download failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Petr Štetiar (cherry picked from commit cf3da66d2ce11a30ae2993b56276ade10c9bddb9) --- package/base-files/Makefile | 2 +- package/base-files/files/sbin/sysupgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index a1a9790f2f..b82a63618d 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=204.1 +PKG_RELEASE:=204.2 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 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 -- 2.25.1