From 34437af88867c4435add8a144417290b7fd4362a Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 14 May 2022 01:26:02 +0200 Subject: base-files: allow ignoring minor compat-version check Downstream projects might re-generate device-specific configuration based on OpenWrt's defaults on each upgrade, thus being unaffected by forward- as well as backwards-breaking configuration. Add a new sysupgrade parameter, which allows sysupgrades between minor compat-versions. Upgrades will still fail upon mismatching major compat versions. Signed-off-by: David Bauer --- package/base-files/files/lib/upgrade/fwtool.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'package/base-files/files/lib') diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh index a45f3bbc73..8bd00a3332 100644 --- a/package/base-files/files/lib/upgrade/fwtool.sh +++ b/package/base-files/files/lib/upgrade/fwtool.sh @@ -71,6 +71,7 @@ fwtool_check_image() { # minor compat version -> sysupgrade with -n required if [ "${devicecompat#.*}" != "${imagecompat#.*}" ] && [ "$SAVE_CONFIG" = "1" ]; then + [ "$IGNORE_MINOR_COMPAT" = 1 ] && return 0 v "The device is supported, but the config is incompatible to the new image ($devicecompat->$imagecompat). Please upgrade without keeping config (sysupgrade -n)." [ -n "$compatmessage" ] && v "$compatmessage" return 1 -- cgit v1.2.3