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>
This commit is contained in:
Álvaro Fernández Rojas 2024-01-31 11:43:55 +01:00
parent fb80be6944
commit 4b3c1251a4

View File

@ -307,7 +307,11 @@ if [ -n "$CONF_RESTORE" ]; then
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
v "Restoring config files..."
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