From 8503de45557eb65b444f63532beb6404860ba6d6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 4 May 2024 22:51:23 +0200 Subject: [PATCH] wip/redhat --- cd.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/cd.sh b/cd.sh index f61491a..7975e14 100644 --- a/cd.sh +++ b/cd.sh @@ -274,31 +274,42 @@ local file cd_step "Set packages repositories" case "${CD_OS_ID}" in "${CD_OS_ALMA}") - file="/etc/yum.repos.d/almalinux.repo" + case "${CD_OS_VERSION}" in + "8") file="/etc/yum.repos.d/almalinux.repo" ;; + "9") file="/etc/yum.repos.d/almalinux-baseos.repo" ;; + esac cd_sed "${file}" \ "|^mirrorlist|# mirrorlist|" \ - "|${CD_DEFAULT_REPO_ALMA}|${CD_OS_REPO}|" \ + "|${CD_DEFAULT_REPO_ALMA}|${CD_URL_CHOSEN}|" \ "|^# baseurl|baseurl|" ;; "${CD_OS_ALPINE}") file="/etc/apk/repositories" cd_write "${file}" "\ -${CD_OS_REPO}/v${CD_OS_VERSION}/main -${CD_OS_REPO}/v${CD_OS_VERSION}/community +${CD_URL_CHOSEN}/v${CD_OS_VERSION}/main +${CD_URL_CHOSEN}/v${CD_OS_VERSION}/community " ;; "${CD_OS_DEBIAN}") file="/etc/apt/sources.list" cd_write "${file}" "\ -deb ${CD_OS_REPO} ${CD_OS_VERSION} main -deb ${CD_OS_REPO} ${CD_OS_VERSION}-backports main -deb ${CD_OS_REPO} ${CD_OS_VERSION}-updates main -deb ${CD_OS_REPO}-security ${CD_OS_VERSION}-security main +deb ${CD_URL_CHOSEN} ${CD_OS_VERSION} main +deb ${CD_URL_CHOSEN} ${CD_OS_VERSION}-backports main +deb ${CD_URL_CHOSEN} ${CD_OS_VERSION}-updates main +deb ${CD_URL_CHOSEN}-security ${CD_OS_VERSION}-security main " ;; - # TODO "${CD_OS_ROCKY}") + case "${CD_OS_VERSION}" in + "8") file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;; + "9") file="/etc/yum.repos.d/rocky.repo" ;; + esac + cd_sed "${file}" \ + "|^mirrorlist|# mirrorlist|" \ + "|${CD_DEFAULT_REPO_ALMA}|${CD_URL_CHOSEN}|" \ + "|^#baseurl|baseurl|" ;; + # TODO "${CD_OS_UBUNTU}") ;; esac