From 8797e27dad09773b2879052ab8378c3c8f3ccd72 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 8 Sep 2024 20:31:35 +0200 Subject: [PATCH] ca/update --- spcd/bootstrap.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 876c449..273fbbf 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -845,6 +845,25 @@ spcd_f_ca_install() { spcd_f_pm_pkg_install "ca-certificates" } +spcd_f_ca_update() { + spcd_step "Update certificates" + case "${SPCD_OS_ID}" in + "${SPCD_OS_ARCH}" | \ + "${SPCD_OS_ALMA}" | \ + "${SPCD_OS_FEDORA}" | \ + "${SPCD_OS_ROCKY}") + spcd_run update-ca-trust + ;; + "${SPCD_OS_ALPINE}" | \ + "${SPCD_OS_DEBIAN}" | \ + "${SPCD_OS_OPENSUSE}" | \ + "${SPCD_OS_UBUNTU}") + spcd_run update-ca-certificates + ;; + *) ;; + esac +} + # ╭───┬──────────────────────╮ # │ f │ pm = package manager │ # ╰───┴──────────────────────╯ @@ -1360,25 +1379,6 @@ spcd_step__ca_write_certificates() { spcd_ca "write" "${root}" } -spcd_step__ca_update_certificates() { - spcd_step "Update certificates" - case "${SPCD_OS_ID}" in - "${SPCD_OS_ARCH}" | \ - "${SPCD_OS_ALMA}" | \ - "${SPCD_OS_FEDORA}" | \ - "${SPCD_OS_ROCKY}") - spcd_run update-ca-trust - ;; - "${SPCD_OS_ALPINE}" | \ - "${SPCD_OS_DEBIAN}" | \ - "${SPCD_OS_OPENSUSE}" | \ - "${SPCD_OS_UBUNTU}") - spcd_run update-ca-certificates - ;; - *) ;; - esac -} - # ╭───┬──────────╮ # │ s │ packages │ # ╰───┴──────────╯ @@ -1596,7 +1596,7 @@ spcd_main() { spcd_step_in "CA" spcd_f_ca_install spcd_step__ca_write_certificates - spcd_step__ca_update_certificates + spcd_f_ca_update spcd_step_out # packages spcd_step_in "Packages"