aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-11-26 18:43:59 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-04 11:41:49 +0100
commit81b5e8e5d21437a65ebfb98112a0709f4020af36 (patch)
tree9ba3d7f0960fe58da4c7a191581d68d42f19ed55
parent377eac0ceb7145be6e294cbd077b9e562776fd50 (diff)
downloadupstream-81b5e8e5d21437a65ebfb98112a0709f4020af36.tar.gz
upstream-81b5e8e5d21437a65ebfb98112a0709f4020af36.tar.bz2
upstream-81b5e8e5d21437a65ebfb98112a0709f4020af36.zip
base-files: add a hint in sysupgrade that shows what to do when the image metadata check fails
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/base-files/files/lib/upgrade/fwtool.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh
index 984c173097..49f02b7bd9 100644
--- a/package/base-files/files/lib/upgrade/fwtool.sh
+++ b/package/base-files/files/lib/upgrade/fwtool.sh
@@ -9,6 +9,9 @@ fwtool_check_image() {
if ! fwtool -q -i /tmp/sysupgrade.meta "$1"; then
echo "Image metadata not found"
+ [ "$REQUIRE_IMAGE_METADATA" = 1 -a "$FORCE" != 1 ] && {
+ echo "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"
+ }
[ "$REQUIRE_IMAGE_METADATA" = 1 ] && return 1
return 0
fi