wip/redhat

This commit is contained in:
Marc Beninca 2024-05-04 22:51:23 +02:00
parent 1652a1545b
commit 8503de4555
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

29
cd.sh
View file

@ -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