base-files: allow ignoring minor compat-version check
[openwrt/openwrt.git] / package / base-files / files / lib / upgrade / fwtool.sh
index a45f3bbc731fdda2af38431b68a978e69b1b8107..8bd00a333288d04b749443d7fe97dd6fac55863a 100644 (file)
@@ -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