https
This commit is contained in:
parent
faf17ad62f
commit
288f1a3101
1 changed files with 7 additions and 8 deletions
15
cd.sh
15
cd.sh
|
@ -67,6 +67,7 @@ cd_set_environment_variables () {
|
|||
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
|
||||
CD_CMD_CLEAN="dnf clean all"
|
||||
CD_CMD_UPGRADE="dnf upgrade --assumeyes"
|
||||
CD_FILE_HTTPS="/etc/dnf/dnf.conf.d/https.conf"
|
||||
CD_PYTHON_COMMAND="python3.11"
|
||||
CD_PYTHON_PACKAGE="python3.11"
|
||||
CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages"
|
||||
|
@ -81,6 +82,7 @@ cd_set_environment_variables () {
|
|||
CD_CA_ROOT="/usr/local/share/ca-certificates"
|
||||
CD_CMD_CLEAN="apt-get clean"
|
||||
CD_CMD_UPGRADE="apt-get upgrade --assume-yes"
|
||||
CD_FILE_HTTPS="/etc/apt/apt.conf.d/https"
|
||||
CD_PYTHON_COMMAND="python3"
|
||||
CD_PYTHON_PACKAGE="python3"
|
||||
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
|
||||
|
@ -186,12 +188,12 @@ cd_set_https_verification_off () {
|
|||
cd_step "Set HTTPS verification off"
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_ALMA}")
|
||||
cd_write "/etc/dnf/dnf.conf.d/https.conf" "\
|
||||
cd_write "${CD_FILE_HTTPS}" "\
|
||||
sslverify=False
|
||||
"
|
||||
;;
|
||||
"${CD_OS_DEBIAN}")
|
||||
cd_write "/etc/apt/apt.conf.d/https" "\
|
||||
cd_write "${CD_FILE_HTTPS}" "\
|
||||
Acquire::https::Verify-Peer False;
|
||||
"
|
||||
;;
|
||||
|
@ -242,18 +244,15 @@ cd_update_ca_certificates () {
|
|||
esac
|
||||
}
|
||||
|
||||
# agnostic steps
|
||||
|
||||
cd_set_https_verification_on () {
|
||||
if [ "${CD_CA}" -o "${CD_OS_ID}" = "${CD_OS_DEBIAN}" ] ; then
|
||||
cd_step "Set HTTPS verification on"
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_ALMA}") cd_rm "/etc/dnf/dnf.conf.d/https.conf" ;;
|
||||
"${CD_OS_DEBIAN}") cd_rm "/etc/apt/apt.conf.d/https" ;;
|
||||
esac
|
||||
cd_rm "${CD_FILE_HTTPS}"
|
||||
fi
|
||||
}
|
||||
|
||||
# agnostic steps
|
||||
|
||||
cd_upgrade_packages () {
|
||||
cd_step "Upgrade packages"
|
||||
${CD_CMD_UPGRADE} || exit
|
||||
|
|
Loading…
Reference in a new issue