diff --git a/build/scripts/setup/script.d/05-setup-message-bus.sh b/build/scripts/setup/script.d/05-setup-message-bus.sh index 4fe5d5e..1ab60a5 100755 --- a/build/scripts/setup/script.d/05-setup-message-bus.sh +++ b/build/scripts/setup/script.d/05-setup-message-bus.sh @@ -19,7 +19,9 @@ __get_setup_script_directory_by_os_release() { } || { pushd "${ID}" >/dev/null } || { - pushd "${ID_LIKE}" >/dev/null + [[ -n ${ID_LIKE} ]] && for ID in ${ID_LIKE}; do + pushd "${ID}" >/dev/null && break + done } || { echo "Unsupported OS: ${ID} ${VERSION_CODENAME} (${ID_LIKE})" exit 1 diff --git a/build/sysroot/usr/share/casaos/cleanup/script.d/05-cleanup-message-bus.sh b/build/sysroot/usr/share/casaos/cleanup/script.d/05-cleanup-message-bus.sh index b78be0d..6d4003f 100755 --- a/build/sysroot/usr/share/casaos/cleanup/script.d/05-cleanup-message-bus.sh +++ b/build/sysroot/usr/share/casaos/cleanup/script.d/05-cleanup-message-bus.sh @@ -16,7 +16,9 @@ __get_setup_script_directory_by_os_release() { } || { pushd "${ID}" &>/dev/null } || { - pushd "${ID_LIKE}" &>/dev/null + [[ -n ${ID_LIKE} ]] && for ID in ${ID_LIKE}; do + pushd "${ID}" >/dev/null && break + done } || { echo "Unsupported OS: ${ID} ${VERSION_CODENAME} (${ID_LIKE})" exit 1