From f3c6f7a1cfbe0591fb2347f5ae77e9b56a364b60 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 11:11:26 +0200 Subject: [PATCH] ca/update --- spcd/bootstrap.sh | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 9d7bf0c..6851b6e 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -616,23 +616,8 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")" ;; *) ;; esac - case "${SPCD_OS_ID}" in - "${SPCD_OS_ARCH}" | \ - "${SPCD_OS_ALMA}" | \ - "${SPCD_OS_FEDORA}" | \ - "${SPCD_OS_ROCKY}") - SPCD_CMD_CA="update-ca-trust" - ;; - "${SPCD_OS_ALPINE}" | \ - "${SPCD_OS_DEBIAN}" | \ - "${SPCD_OS_OPENSUSE}" | \ - "${SPCD_OS_UBUNTU}") - SPCD_CMD_CA="update-ca-certificates" - ;; - *) ;; - esac spcd_split - spcd_os_printenv "SPCD_CA_ROOT" "SPCD_CMD_CA" + spcd_os_printenv "SPCD_CA_ROOT" # set package manager case "${SPCD_OS_ID}" in "${SPCD_OS_ALPINE}") @@ -1068,7 +1053,21 @@ spcd_ca_write_certificates() { spcd_ca_update_certificates() { spcd_step "Update certificates" - ${SPCD_CMD_CA} + case "${SPCD_OS_ID}" in + "${SPCD_OS_ARCH}" | \ + "${SPCD_OS_ALMA}" | \ + "${SPCD_OS_FEDORA}" | \ + "${SPCD_OS_ROCKY}") + update-ca-trust + ;; + "${SPCD_OS_ALPINE}" | \ + "${SPCD_OS_DEBIAN}" | \ + "${SPCD_OS_OPENSUSE}" | \ + "${SPCD_OS_UBUNTU}") + update-ca-certificates + ;; + *) ;; + esac } # ╭───────┬──────────╮