diff --git a/cd.sh b/cd.sh index c35730d..e822f55 100644 --- a/cd.sh +++ b/cd.sh @@ -16,11 +16,11 @@ cd_main () { cd_set_dns_resolving cd_set_packages_repositories cd_set_packages_configuration - cd_write_ca_certificates cd_set_https_verification_off cd_update_packages_catalog cd_install_packages_tools cd_install_ca_certificates + cd_write_ca_certificates cd_update_ca_certificates cd_set_https_verification_on cd_update_packages_catalog @@ -175,20 +175,6 @@ Dir::Etc::SourceParts \"\"; esac } -cd_write_ca_certificates () { -local index -local text - cd_step "Copy CA" - cd_mkdir "${CD_CA_ROOT}" - index=1 - eval "text=\"\${CD_CA_${index}}\"" - while [ "${text}" ] ; do - cd_write "${CD_CA_ROOT}/${index}.crt" "${text}" - index=$((index+1)) - eval "text=\"\${CD_CA_${index}}\"" - done -} - cd_set_https_verification_off () { if [ "${CD_CA}" ] ; then cd_step "Set HTTPS verification off" @@ -228,6 +214,20 @@ cd_install_ca_certificates () { cd_install_package "${CD_CA_PACKAGE}" } +cd_write_ca_certificates () { +local index +local text + cd_step "Copy CA" + cd_mkdir "${CD_CA_ROOT}" + index=1 + eval "text=\"\${CD_CA_${index}}\"" + while [ "${text}" ] ; do + cd_write "${CD_CA_ROOT}/${index}.crt" "${text}" + index=$((index+1)) + eval "text=\"\${CD_CA_${index}}\"" + done +} + cd_update_ca_certificates () { cd_step "Update CA" case "${CD_OS_ID}" in