cd_ca_root

This commit is contained in:
Marc Beninca 2024-05-02 09:33:50 +02:00
parent 5787bf6fca
commit 38d2138950
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

14
cd.sh
View file

@ -42,10 +42,12 @@ cd_set_environment () {
#
case "${CD_OS_NAME}" in
"debian")
CD_CA_ROOT="/usr/local/share/ca-certificates"
CD_PYTHON_PACKAGE="python3"
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
;;
"alma")
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
case "${CD_OS_VERSION}" in
"8"|"9")
CD_PYTHON_PACKAGE="python3.11"
@ -153,21 +155,13 @@ Dir::Etc::SourceParts \"\";
cd_write_ca_certificates () {
local index
local target
local text
cd_step "Copy CA"
case "${CD_OS_NAME}" in
"debian")
target="/usr/local/share/ca-certificates"
cd_mkdir "${target}"
;;
"alma") target="/etc/pki/ca-trust/source/anchors" ;;
*) cd_error_os "cd_copy_ca" ;;
esac
cd_mkdir "${CD_CA_ROOT}"
index=1
eval "text=\${CD_CA_${index}}"
while [ "${text}" ] ; do
cd_write "${target}/${index}.crt" "${text}"
cd_write "${CD_CA_ROOT}/${index}.crt" "${text}"
CD_CA=$((CD_CA+1))
index=$((index+1))
eval "text=\${CD_CA_${index}}"