kirkwood: fix Linksys upgrade, restore config step
authorMichael Trinidad <trinidude4@hotmail.com>
Sat, 1 Apr 2023 19:04:02 +0000 (15:04 -0400)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 11 Apr 2023 10:21:15 +0000 (12:21 +0200)
It appears that the refactor of the upgrade process for NAND devices
resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration was
not preserved over sysupgrade steps.

This restores the preservation of configs for kirkwood devices using the
linksys.sh script.

Fixes: e25e6d8e5407 ("base-files: fix and clean up nand sysupgrade code")
Fixes: #12298
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
target/linux/kirkwood/base-files/lib/upgrade/linksys.sh

index 9067f00e1a88d8fb42b597f074bd36551ea9f50d..207a65d713249ca4f7b293dc4ef0d0dea12535ed 100644 (file)
@@ -68,7 +68,12 @@ platform_do_upgrade_linksys() {
                        CI_UBIPART="rootfs2"
                fi
 
-               nand_upgrade_tar "$1"
+               if nand_upgrade_tar "$1" ; then
+                       nand_do_upgrade_success
+               else
+                       nand_do_upgrade_failed
+               fi
+
        }
        [ "$magic_long" = "27051956" ] && {
                get_image "$1" | mtd write - $part_label