diff --git a/shell/debian.sh b/shell/debian.sh index e4085df..f806ba6 100644 --- a/shell/debian.sh +++ b/shell/debian.sh @@ -8,6 +8,20 @@ apt_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_target "${DEBIAN_CODENAME}-backports" "${@}" } diff --git a/shell/rescue/common.sh b/shell/rescue/common.sh index 306f7fa..49a9305 100644 --- a/shell/rescue/common.sh +++ b/shell/rescue/common.sh @@ -1,17 +1,7 @@ rescue_configure() { local hostname="${1}" # apt / conf - 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_conf_write # apt / sources apt_sources_write # bash / rc