diff --git a/cd.sh b/cd.sh index ace2502..a680ed3 100644 --- a/cd.sh +++ b/cd.sh @@ -106,24 +106,32 @@ cd_set_environment_variables () { CD_DNS_FILE="/etc/resolv.conf" CD_PKG_GIT="git" cd_split - cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT" + cd_echo "CD_DNS_FILE" "CD_PKG_GIT" # shared case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" CD_CMD_CA="update-ca-trust" + CD_PKG_CA="ca-certificates" + ;; + "${CD_OS_ALPINE}") + CD_CA_ROOT="/usr/local/share/ca-certificates" + CD_CMD_CA="update-ca-certificates" + CD_PKG_CA="ca-certificates-bundle" ;; "${CD_OS_ARCH}") CD_CA_ROOT="/etc/ca-certificates/trust-source/anchors" CD_CMD_CA="update-ca-trust" + CD_PKG_CA="ca-certificates" ;; - "${CD_OS_ALPINE}"|"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") + "${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") CD_CA_ROOT="/usr/local/share/ca-certificates" CD_CMD_CA="update-ca-certificates" + CD_PKG_CA="ca-certificates" ;; esac cd_split - cd_echo "CD_CA_ROOT" "CD_CMD_CA" + cd_echo "CD_CA_ROOT" "CD_CMD_CA" "CD_PKG_CA" # common case "${CD_OS_ID}" in "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}") @@ -132,7 +140,6 @@ cd_set_environment_variables () { CD_CMD_QUERY="rpm --query" CD_CMD_UPDATE="dnf makecache" CD_CMD_UPGRADE="dnf upgrade --assumeyes" - CD_PKG_CA="ca-certificates" CD_PKG_PKG="" CD_PM_CONF_PATH="/etc/dnf/dnf.conf" CD_PM_CONF_TEXT="\ @@ -152,7 +159,6 @@ skip_if_unavailable=False CD_CMD_QUERY="apk info" CD_CMD_UPDATE="apk update" CD_CMD_UPGRADE="apk upgrade" - CD_PKG_CA="ca-certificates-bundle" CD_PKG_PKG="" CD_PM_CONF_PATH="" CD_PM_CONF_TEXT="" @@ -165,7 +171,6 @@ skip_if_unavailable=False CD_CMD_QUERY="pacman --query" CD_CMD_UPDATE="pacman --sync --refresh" CD_CMD_UPGRADE="pacman --sync --sysupgrade --noconfirm" - CD_PKG_CA="ca-certificates" CD_PKG_PKG="" CD_PM_CONF_PATH="" CD_PM_CONF_TEXT="" @@ -178,7 +183,6 @@ skip_if_unavailable=False CD_CMD_QUERY="dpkg-query --show" CD_CMD_UPDATE="apt-get update" CD_CMD_UPGRADE="apt-get upgrade --assume-yes" - CD_PKG_CA="ca-certificates" CD_PKG_PKG="apt-utils" CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf" CD_PM_CONF_TEXT="\