From e5d17cd0f010a506b34dc2dcfbabd27336a2026a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 3 May 2024 23:19:30 +0200 Subject: [PATCH] conf/text --- cd.sh | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/cd.sh b/cd.sh index 6d1a81f..a9b5700 100644 --- a/cd.sh +++ b/cd.sh @@ -71,6 +71,14 @@ cd_set_environment_variables () { CD_CMD_UPGRADE="dnf upgrade --assumeyes" CD_PKG_PKG="" CD_PM_CONF_PATH="/etc/dnf/dnf.conf" + CD_PM_CONF_TEXT="\ +[main] +best=True +clean_requirements_on_remove=True +gpgcheck=1 +installonly_limit=3 +skip_if_unavailable=False +" CD_PM_HTTPS_PATH="/etc/dnf/dnf.conf.d/https.conf" CD_PM_HTTPS_TEXT="sslverify=False" CD_PYTHON_COMMAND="python3.11" @@ -93,6 +101,13 @@ cd_set_environment_variables () { CD_CMD_UPGRADE="apt-get upgrade --assume-yes" CD_PKG_PKG="apt-utils" CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf" + CD_PM_CONF_TEXT="\ +Acquire::Check-Valid-Until True; +APT::Get::Show-Versions True; +APT::Install-Recommends False; +APT::Install-Suggests False; +Dir::Etc::SourceParts \"\"; +" CD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https" CD_PM_HTTPS_TEXT="Acquire::https::Verify-Peer False;" CD_PYTHON_COMMAND="python3" @@ -178,33 +193,13 @@ deb ${CD_OS_REPO}-security ${CD_OS_VERSION}-security main esac } +# agnostic steps + cd_set_packages_configuration () { cd_step "Set packages configuration" - case "${CD_OS_ID}" in - "${CD_OS_ALMA}") - cd_write "${CD_PM_CONF_PATH}" "\ -[main] -best=True -clean_requirements_on_remove=True -gpgcheck=1 -installonly_limit=3 -skip_if_unavailable=False -" - ;; - "${CD_OS_DEBIAN}") - cd_write "${CD_PM_CONF_PATH}" "\ -Acquire::Check-Valid-Until True; -APT::Get::Show-Versions True; -APT::Install-Recommends False; -APT::Install-Suggests False; -Dir::Etc::SourceParts \"\"; -" - ;; - esac + cd_write "${CD_PM_CONF_PATH}" "${CD_PM_CONF_TEXT}" } -# agnostic steps - cd_set_https_verification_off () { if [ "${CD_CA}" -o "${CD_OS_ID}" = "${CD_OS_DEBIAN}" ] ; then cd_step "Set HTTPS verification off"