wip/os
This commit is contained in:
parent
a70fa248c0
commit
dcd919e8a8
1 changed files with 14 additions and 10 deletions
24
cd.sh
24
cd.sh
|
@ -46,22 +46,27 @@ cd_set_environment_variables () {
|
|||
# operating system
|
||||
CD_OS_ID="$(cd_grep_os ID)"
|
||||
case "${CD_OS_ID}" in
|
||||
"almalinux")
|
||||
CD_OS_ID="${CD_OS_ALMA}"
|
||||
"almalinux") CD_OS_ID="${CD_OS_ALMA}" ;;
|
||||
"alpine") CD_OS_ID="${CD_OS_ALPINE}" ;;
|
||||
"debian") CD_OS_ID="${CD_OS_DEBIAN}" ;;
|
||||
"rocky") CD_OS_ID="${CD_OS_ROCKY}" ;;
|
||||
"ubuntu") CD_OS_ID="${CD_OS_UBUNTU}" ;;
|
||||
*) cd_error_os "CD_OS_ID" ;;
|
||||
esac
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
||||
CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)"
|
||||
;;
|
||||
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}")
|
||||
CD_OS_VERSION=$(cd_grep_os VERSION_ID \
|
||||
| sed "s|^\([0-9]\+\)\..*|\1|")
|
||||
;;
|
||||
"alpine")
|
||||
CD_OS_ID="${CD_OS_ALPINE}"
|
||||
"${CD_OS_ALPINE}")
|
||||
CD_OS_VERSION=$(cd_grep_os VERSION_ID \
|
||||
| sed "s|^\([0-9]\+\.[0-9]\+\)\..*|\1|")
|
||||
;;
|
||||
"debian")
|
||||
CD_OS_ID="${CD_OS_DEBIAN}"
|
||||
CD_OS_VERSION="$(cd_grep_os VERSION_CODENAME)"
|
||||
;;
|
||||
*) cd_error_os "CD_OS_ID" ;;
|
||||
esac
|
||||
cd_echo "CD_OS_ID" "CD_OS_VERSION"
|
||||
# universal
|
||||
CD_DNS_FILE="/etc/resolv.conf"
|
||||
CD_PKG_CA="ca-certificates"
|
||||
|
@ -182,7 +187,6 @@ Dir::Etc::SourceParts \"\";
|
|||
CD_PROJECTS_URL="${CD_SERVER_URL}/${CD_PROJECTS_GROUP}"
|
||||
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
|
||||
#
|
||||
cd_echo "CD_OS_ID" "CD_OS_VERSION"
|
||||
cd_split
|
||||
cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT"
|
||||
cd_split
|
||||
|
|
Loading…
Reference in a new issue