cd_write_ca

This commit is contained in:
Marc Beninca 2024-04-30 12:30:08 +02:00
parent 3de8ea1b23
commit 292d5e0c9e
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

14
cd.sh
View file

@ -18,7 +18,7 @@ cd_main () {
cd_update_packages_catalog cd_update_packages_catalog
cd_install_packages_tools cd_install_packages_tools
cd_install_ca cd_install_ca
cd_copy_ca cd_write_ca
cd_update_ca cd_update_ca
cd_set_https_verification_on cd_set_https_verification_on
cd_update_packages_catalog cd_update_packages_catalog
@ -191,15 +191,23 @@ cd_install_ca () {
cd_install_package "${CD_CA_PACKAGE}" cd_install_package "${CD_CA_PACKAGE}"
} }
cd_copy_ca () { cd_write_ca () {
local index
local target local target
local text
cd_step "Copy CA" cd_step "Copy CA"
case "${CD_OS_NAME}" in case "${CD_OS_NAME}" in
"debian") target="/usr/local/share/ca-certificates" ;; "debian") target="/usr/local/share/ca-certificates" ;;
"alma") target="/etc/pki/ca-trust/source/anchors" ;; "alma") target="/etc/pki/ca-trust/source/anchors" ;;
*) cd_error_os "cd_copy_ca" ;; *) cd_error_os "cd_copy_ca" ;;
esac esac
echo "TODO" index=1
eval "text=\${CD_CA_${index}}"
while [ "${text}" ] ; do
cd_write "${target}/${index}.crt" "${text}"
index=$((index+1))
eval "text=\${CD_CA_${index}}"
done
} }
cd_update_ca () { cd_update_ca () {