detect cd_os_id

This commit is contained in:
Marc Beninca 2024-05-03 12:55:28 +02:00
parent 231c841105
commit c6846165aa
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

11
cd.sh
View file

@ -12,7 +12,7 @@ rwx \
# main # main
cd_main () { cd_main () {
cd_set_environment cd_set_environment_variables
cd_set_dns_resolving cd_set_dns_resolving
cd_set_packages_repositories cd_set_packages_repositories
cd_set_packages_configuration cd_set_packages_configuration
@ -34,9 +34,14 @@ cd_main () {
# steps # steps
cd_set_environment () { cd_set_environment_variables () {
local variable 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_CA_PACKAGE="ca-certificates"
CD_DNS_FILE="/etc/resolv.conf" CD_DNS_FILE="/etc/resolv.conf"