apt_conf_write

This commit is contained in:
Marc Beninca 2024-11-15 19:24:48 +01:00
parent 1d86226365
commit 5ff98571f9
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 15 additions and 11 deletions

View file

@ -8,6 +8,20 @@ apt_clean() {
clean clean
} }
apt_conf_write() {
printf "\
Acquire::AllowInsecureRepositories False;
Acquire::AllowWeakRepositories False;
Acquire::AllowDowngradeToInsecureRepositories False;
Acquire::Check-Valid-Until True;
APT::Install-Recommends False;
APT::Install-Suggests False;
APT::Get::Show-Versions True;
Dir::Etc::SourceParts \"\";
Dpkg::Progress True;
" >"/etc/apt/apt.conf.d/apt.conf"
}
apt_install_backports() { apt_install_backports() {
apt_install_target "${DEBIAN_CODENAME}-backports" "${@}" apt_install_target "${DEBIAN_CODENAME}-backports" "${@}"
} }

View file

@ -1,17 +1,7 @@
rescue_configure() { rescue_configure() {
local hostname="${1}" local hostname="${1}"
# apt / conf # apt / conf
printf "\ apt_conf_write
Acquire::AllowInsecureRepositories False;
Acquire::AllowWeakRepositories False;
Acquire::AllowDowngradeToInsecureRepositories False;
Acquire::Check-Valid-Until True;
APT::Install-Recommends False;
APT::Install-Suggests False;
APT::Get::Show-Versions True;
Dir::Etc::SourceParts \"\";
Dpkg::Progress True;
" >"/etc/apt/apt.conf.d/apt.conf"
# apt / sources # apt / sources
apt_sources_write apt_sources_write
# bash / rc # bash / rc