aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2024-01-31 11:43:55 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2024-03-04 16:27:39 +0100
commit4b3c1251a4b511c36b6fdbb6f249ccd3114b00c5 (patch)
treefce6986f7ef242904fccc840bd1892e8a2e03dfa
parentfb80be694427e9d692c02c6ab7b10caf4e539a62 (diff)
base-files: sysupgrade: allow overriding config restore
Some platforms like Raspberry Pi require patching some backup files like cmdline.txt in order to set the correct root PARTUUID. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 720f3da3fa..ed8871b892 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -307,7 +307,11 @@ if [ -n "$CONF_RESTORE" ]; then
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
v "Restoring config files..."
- tar -C / -x${TAR_V}zf "$CONF_RESTORE"
+ if [ "$(type -t platform_restore_backup)" == 'platform_restore_backup' ]; then
+ platform_restore_backup "$TAR_V"
+ else
+ tar -C / -x${TAR_V}zf "$CONF_RESTORE"
+ fi
exit $?
fi