This commit is contained in:
Marc Beninca 2024-05-03 21:43:25 +02:00
parent 8b9ddbec9f
commit 585e1d58e2
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

11
cd.sh
View file

@ -71,6 +71,7 @@ cd_set_environment_variables () {
CD_CMD_UPGRADE="dnf upgrade --assumeyes" CD_CMD_UPGRADE="dnf upgrade --assumeyes"
CD_FILE_HTTPS_NAME="/etc/dnf/dnf.conf.d/https.conf" CD_FILE_HTTPS_NAME="/etc/dnf/dnf.conf.d/https.conf"
CD_FILE_HTTPS_TEXT="sslverify=False" CD_FILE_HTTPS_TEXT="sslverify=False"
CD_PKG_PKG=""
CD_PYTHON_COMMAND="python3.11" CD_PYTHON_COMMAND="python3.11"
CD_PYTHON_PACKAGE="python3.11" CD_PYTHON_PACKAGE="python3.11"
CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages" CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages"
@ -89,6 +90,7 @@ cd_set_environment_variables () {
CD_CMD_UPGRADE="apt-get upgrade --assume-yes" CD_CMD_UPGRADE="apt-get upgrade --assume-yes"
CD_FILE_HTTPS_NAME="/etc/apt/apt.conf.d/https" CD_FILE_HTTPS_NAME="/etc/apt/apt.conf.d/https"
CD_FILE_HTTPS_TEXT="Acquire::https::Verify-Peer False;" CD_FILE_HTTPS_TEXT="Acquire::https::Verify-Peer False;"
CD_PKG_PKG="apt-utils"
CD_PYTHON_COMMAND="python3" CD_PYTHON_COMMAND="python3"
CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGE="python3"
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
@ -189,6 +191,8 @@ Dir::Etc::SourceParts \"\";
esac esac
} }
# agnostic steps
cd_set_https_verification_off () { cd_set_https_verification_off () {
if [ "${CD_CA}" -o "${CD_OS_ID}" = "${CD_OS_DEBIAN}" ] ; then if [ "${CD_CA}" -o "${CD_OS_ID}" = "${CD_OS_DEBIAN}" ] ; then
cd_step "Set HTTPS verification off" cd_step "Set HTTPS verification off"
@ -203,14 +207,9 @@ cd_update_packages_catalog () {
cd_install_packages_tools () { cd_install_packages_tools () {
cd_step "Install packages tools" cd_step "Install packages tools"
case "${CD_OS_ID}" in cd_install_package "${CD_PKG_PKG}"
"${CD_OS_ALMA}") cd_nop ;;
"${CD_OS_DEBIAN}") cd_install_package "apt-utils" ;;
esac
} }
# agnostic steps
cd_install_ca_certificates () { cd_install_ca_certificates () {
cd_step "Install CA" cd_step "Install CA"
cd_install_package "${CD_CA_PACKAGE}" cd_install_package "${CD_CA_PACKAGE}"