Rename hassos to haos (#1213)

* Change HASSOS_ID from hassos to haos

Use a rauc install-check hook to make this update compatible with OS
releases using hassos in the compatible string.

* Use home-assistant as organization in CPE_NAME

Align with Home Assistant core which uses home-assistant with a dash as
organization in CPE_NAME.
This commit is contained in:
Stefan Agner
2021-03-09 15:27:12 +01:00
committed by GitHub
parent 28e3b109b7
commit 66e5ea3b4b
5 changed files with 26 additions and 4 deletions

View File

@@ -2,7 +2,28 @@
##
# Hooks
env
case "$1" in
install-check)
if [ "$RAUC_MF_COMPATIBLE" = "$RAUC_SYSTEM_COMPATIBLE" ]; then
exit 0
fi
# Be compatible with hassos OS ID
# shellcheck disable=SC2039
rauc_os_compatible=${RAUC_MF_COMPATIBLE/haos-/hassos-}
if [ "$rauc_os_compatible" = "$RAUC_SYSTEM_COMPATIBLE" ]; then
exit 0
fi
echo "Compatible does not match!" 1>&2
exit 10
;;
slot-install)
# Use install handlers below
;;
*)
exit 1
;;
esac
# Handle boot hocks
if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then