diff --git a/cd.sh b/cd.sh index 5f799d4..6ffb0c3 100644 --- a/cd.sh +++ b/cd.sh @@ -56,11 +56,26 @@ local text='' || exit } +function cd_set_packages_repositories { + cd_step "configure package repositories" + case "${CD_OS_NAME}" in + 'debian') + cd_write '/etc/apt/sources.list' "\ +deb https://deb.debian.org/debian bookworm main +deb https://deb.debian.org/debian bookworm-backports main +deb https://deb.debian.org/debian bookworm-updates main +deb https://deb.debian.org/debian-security bookworm-security main +" + ;; + *) exit 1 ;; + esac +} + function cd_set_packages_configuration { cd_step "configure package manager" case "${CD_OS_NAME}" in 'debian') - cd_write '/etc/apt/apt.conf.d/apt.conf' "\ + cd_write '/etc/apt/apt.conf.d/apt.conf' "\ Acquire::Check-Valid-Until True; APT::Get::Show-Versions True; APT::Install-Recommends False; @@ -74,17 +89,9 @@ Dir::Etc::SourceParts \"\"; function cd_main { cd_set_dns_resolving + cd_set_packages_repositories cd_set_packages_configuration -cd_step "configure package repositories" -echo -n "\ -deb https://deb.debian.org/debian bookworm main -deb https://deb.debian.org/debian bookworm-backports main -deb https://deb.debian.org/debian bookworm-updates main -deb https://deb.debian.org/debian-security bookworm-security main -" > '/etc/apt/sources.list' \ -|| exit - cd_step "disable package verification" echo -n "\ Acquire::https::Verify-Peer False;