From c6846165aa303b3306110b95945721084ac00056 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 3 May 2024 12:55:28 +0200 Subject: [PATCH] detect cd_os_id --- cd.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cd.sh b/cd.sh index 57ddc83..0e50c6a 100644 --- a/cd.sh +++ b/cd.sh @@ -12,7 +12,7 @@ rwx \ # main cd_main () { - cd_set_environment + cd_set_environment_variables cd_set_dns_resolving cd_set_packages_repositories cd_set_packages_configuration @@ -34,9 +34,14 @@ cd_main () { # steps -cd_set_environment () { +cd_set_environment_variables () { local variable - cd_step "Set environment" + cd_step "Set environment variables" + # + case "$(cd_grep_os ID)" in + "debian") CD_OS_ID="${CD_OS_DEBIAN}" ;; + "almalinux") CD_OS_ID="${CD_OS_ALMA}" ;; + esac # CD_CA_PACKAGE="ca-certificates" CD_DNS_FILE="/etc/resolv.conf"