detect cd_os_version

This commit is contained in:
Marc Beninca 2024-05-03 13:03:47 +02:00
parent c6846165aa
commit 62690422f5
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

12
cd.sh
View file

@ -39,8 +39,14 @@ local variable
cd_step "Set environment variables" cd_step "Set environment variables"
# #
case "$(cd_grep_os ID)" in case "$(cd_grep_os ID)" in
"debian") CD_OS_ID="${CD_OS_DEBIAN}" ;; "debian")
"almalinux") CD_OS_ID="${CD_OS_ALMA}" ;; CD_OS_ID="${CD_OS_DEBIAN}"
CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)"
;;
"almalinux")
CD_OS_ID="${CD_OS_ALMA}"
CD_OS_VERSION="$(cd_grep_os VERSION_ID)"
;;
esac esac
# #
CD_CA_PACKAGE="ca-certificates" CD_CA_PACKAGE="ca-certificates"
@ -60,7 +66,7 @@ local variable
;; ;;
"${CD_OS_ALMA}") "${CD_OS_ALMA}")
case "${CD_OS_VERSION}" in case "${CD_OS_VERSION}" in
"8"|"9") cd_nop ;; "8."*|"9."*) cd_nop ;;
*) cd_error_os "CD_OS_VERSION" ;; *) cd_error_os "CD_OS_VERSION" ;;
esac esac
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"