comment,rejigger
This commit is contained in:
parent
b5c4c51ced
commit
6786a4ea2f
1 changed files with 22 additions and 18 deletions
|
@ -1,15 +1,5 @@
|
|||
function ovh-rescue-setup {
|
||||
#
|
||||
echo -n 'ovh' > '/etc/hostname'
|
||||
#
|
||||
echo -n "\
|
||||
en_US.UTF-8 UTF-8
|
||||
fr_FR.UTF-8 UTF-8
|
||||
" > '/etc/locale.gen'
|
||||
rm --force '/usr/share/locale/locale.alias'
|
||||
ln --symbolic '/etc/locale.alias' '/usr/share/locale/locale.alias'
|
||||
locale-gen
|
||||
#
|
||||
# apt / conf
|
||||
echo -n "\
|
||||
Acquire::AllowInsecureRepositories False;
|
||||
Acquire::AllowWeakRepositories False;
|
||||
|
@ -21,14 +11,27 @@ APT::Get::Show-Versions True;
|
|||
Dir::Etc::SourceParts '';
|
||||
Dpkg::Progress True;
|
||||
" > '/etc/apt/apt.conf'
|
||||
# apt / sources
|
||||
echo -n "\
|
||||
deb https://deb.debian.org/debian buster main contrib non-free
|
||||
deb https://deb.debian.org/debian buster-backports main contrib non-free
|
||||
deb https://deb.debian.org/debian buster-updates main contrib non-free
|
||||
deb https://deb.debian.org/debian-security buster/updates main contrib non-free
|
||||
" > '/etc/apt/sources.list'
|
||||
#
|
||||
# bash / rc
|
||||
link_bashrc
|
||||
# host name
|
||||
echo -n 'ovh' > '/etc/hostname'
|
||||
# locales
|
||||
echo -n "\
|
||||
en_US.UTF-8 UTF-8
|
||||
fr_FR.UTF-8 UTF-8
|
||||
" > '/etc/locale.gen'
|
||||
# fix alias
|
||||
rm --force '/usr/share/locale/locale.alias'
|
||||
ln --symbolic '/etc/locale.alias' '/usr/share/locale/locale.alias'
|
||||
# generate locales
|
||||
locale-gen
|
||||
}
|
||||
|
||||
function ovh-rescue-install {
|
||||
|
@ -49,17 +52,18 @@ function ovh-rescue-install {
|
|||
'git'
|
||||
'rsync'
|
||||
)
|
||||
#
|
||||
# update catalog
|
||||
apt-get update
|
||||
#
|
||||
export DEBIAN_FRONTEND='noninteractive'
|
||||
#
|
||||
# upgrade packages
|
||||
apt-get upgrade --assume-yes
|
||||
#
|
||||
# install packages
|
||||
apt-get install --assume-yes "${packages[@]}"
|
||||
# install backports
|
||||
apt-get install --assume-yes \
|
||||
--target-release "${release}-backports" "${backports[@]}"
|
||||
#
|
||||
# clean cache
|
||||
apt-get clean
|
||||
}
|
||||
|
||||
|
@ -69,9 +73,9 @@ if [ "${host}" ] ; then
|
|||
local user='root'
|
||||
#
|
||||
local user_host="${user}@${host}"
|
||||
#
|
||||
# remove fingerprints
|
||||
ssh-keygen -R "${host}"
|
||||
#
|
||||
# copy ssh id
|
||||
ssh-copy-id \
|
||||
-o 'StrictHostKeyChecking=accept-new' \
|
||||
"${user_host}"
|
||||
|
|
Loading…
Reference in a new issue