Fix rauc hook compatible compare logic (#1296)

The script looks at the current installations strings, which use haos
and generic-x86-64 respectively. Replace them with the old strings to
make the compare match and allow downgrades.
This commit is contained in:
Stefan Agner 2021-04-01 16:36:53 +02:00 committed by GitHub
parent dfbf20ede3
commit 92bd5e9fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,13 +10,13 @@ case "$1" in
fi fi
# Be compatible with upcomming releases using haos OS ID # Be compatible with upcomming releases using haos OS ID
# shellcheck disable=SC2039 # shellcheck disable=SC2039
rauc_new_os_compatible=${RAUC_SYSTEM_COMPATIBLE/hassos-/haos-} rauc_new_os_compatible=${RAUC_SYSTEM_COMPATIBLE/haos-/hassos-}
if [ "$RAUC_MF_COMPATIBLE" = "${rauc_new_os_compatible}" ]; then if [ "$RAUC_MF_COMPATIBLE" = "${rauc_new_os_compatible}" ]; then
exit 0 exit 0
fi fi
# intel-nuc: Be compatible with upcomming generic-x86-64 # intel-nuc: Be compatible with upcomming generic-x86-64
# shellcheck disable=SC2039 # shellcheck disable=SC2039
rauc_new_board_compatible=${rauc_new_os_compatible/intel-nuc/generic-x86-64} rauc_new_board_compatible=${rauc_new_os_compatible/generic-x86-64/intel-nuc}
if [ "$RAUC_MF_COMPATIBLE" = "${rauc_new_board_compatible}" ]; then if [ "$RAUC_MF_COMPATIBLE" = "${rauc_new_board_compatible}" ]; then
exit 0 exit 0
fi fi