Compare commits
4 commits
b07b446fa5
...
62cd874c26
Author | SHA1 | Date | |
---|---|---|---|
62cd874c26 | |||
ffb2165383 | |||
30eb5cc297 | |||
62036d62c2 |
1 changed files with 20 additions and 10 deletions
28
cd.sh
28
cd.sh
|
@ -1,3 +1,5 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
CD_DNS_SERVERS=(
|
||||
'9.9.9.9'
|
||||
)
|
||||
|
@ -25,7 +27,7 @@ CD_STEP=0
|
|||
|
||||
function cd_step {
|
||||
if [ "${1}" ] ; then
|
||||
CD_STEP=$((CD_STEP+1))
|
||||
((CD_STEP++))
|
||||
echo "
|
||||
↕ ${CD_STEP} ↔ ${1}
|
||||
"
|
||||
|
@ -42,7 +44,7 @@ local text="${2}"
|
|||
fi
|
||||
}
|
||||
|
||||
function cd_set_dns {
|
||||
function cd_set_dns_resolving {
|
||||
local server
|
||||
local text=''
|
||||
cd_step "set name servers"
|
||||
|
@ -54,18 +56,26 @@ local text=''
|
|||
|| exit
|
||||
}
|
||||
|
||||
function cd_main {
|
||||
cd_set_dns
|
||||
|
||||
function cd_set_packages_configuration {
|
||||
cd_step "configure package manager"
|
||||
echo -n "\
|
||||
case "${CD_OS_NAME}" in
|
||||
'debian')
|
||||
cd_write '/etc/apt/apt.conf.d/apt.conf' "\
|
||||
Acquire::Check-Valid-Until True;
|
||||
APT::Get::Show-Versions True;
|
||||
APT::Install-Recommends False;
|
||||
APT::Install-Suggests False;
|
||||
Dir::Etc::SourceParts '';
|
||||
" > '/etc/apt/apt.conf.d/apt.conf' \
|
||||
|| exit
|
||||
Dir::Etc::SourceParts \"\";
|
||||
"
|
||||
;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function cd_main {
|
||||
cd_set_dns_resolving
|
||||
cd_set_packages_configuration
|
||||
|
||||
cd_step "configure package repositories"
|
||||
echo -n "\
|
||||
deb https://deb.debian.org/debian bookworm main
|
||||
|
|
Loading…
Reference in a new issue