mv
This commit is contained in:
parent
dc52d4f73d
commit
338f437861
1 changed files with 23 additions and 23 deletions
46
cd.sh
46
cd.sh
|
@ -14,11 +14,11 @@ cd_main () {
|
|||
cd_set_dns_resolving ${CD_DNS}
|
||||
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
|
||||
|
@ -151,6 +151,28 @@ Dir::Etc::SourceParts \"\";
|
|||
esac
|
||||
}
|
||||
|
||||
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
|
||||
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_set_https_verification_off () {
|
||||
cd_step "Set HTTPS verification off"
|
||||
case "${CD_OS_NAME}" in
|
||||
|
@ -191,28 +213,6 @@ cd_install_ca_certificates () {
|
|||
cd_install_package "${CD_CA_PACKAGE}"
|
||||
}
|
||||
|
||||
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
|
||||
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_certificates () {
|
||||
cd_step "Update CA"
|
||||
case "${CD_OS_NAME}" in
|
||||
|
|
Loading…
Reference in a new issue