From c21b751b72cb862a7cfe25a0a7417e5ca035f37e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 31 Aug 2024 09:50:20 +0200 Subject: [PATCH] trust --- spcd/bootstrap.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 2ec0029..7f37345 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -1054,28 +1054,29 @@ Dir::Etc::SourceParts \"\"; spcd_step__packages_trust_https() { spcd_step "Trust HTTPS" + local path text if [ -n "${SPCD_CA_1}" ] || [ "${SPCD_PM}" = "${SPCD_PM_APT}" ]; then - spcd_pth__path="$(spcd_https_path)" - if [ -n "${spcd_pth__path}" ]; then - spcd_os_mkdir "$(dirname "${spcd_pth__path}")" + path="$(spcd_https_path)" + if [ -n "${path}" ]; then + spcd_os_mkdir "$(dirname "${path}")" case "${SPCD_PM}" in - "${SPCD_PM_APK}") spcd_pth__text="\ + "${SPCD_PM_APK}") text="\ --no-verify " ;; - "${SPCD_PM_APT}") spcd_pth__text="\ + "${SPCD_PM_APT}") text="\ Acquire::https::Verify-Peer False; " ;; - "${SPCD_PM_DNF}") spcd_pth__text="\ + "${SPCD_PM_DNF}") text="\ sslverify=False " ;; - "${SPCD_PM_PACMAN}") spcd_pth__text="\ + "${SPCD_PM_PACMAN}") text="\ SSLVerify = No " ;; "${SPCD_PM_ZYPPER}") ;; *) ;; esac - [ -n "${spcd_pth__text}" ] && - spcd_os_write "${spcd_pth__path}" "${spcd_pth__text}" + [ -n "${text}" ] && + spcd_os_write "${path}" "${text}" fi fi }