configure

This commit is contained in:
Marc Beninca 2024-11-11 13:58:49 +01:00
parent d468491ae0
commit d2ce7a1b74
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,8 +1,9 @@
#! /usr/bin/env sh #! /usr/bin/env sh
ovh_rescue_configure() { ovh_rescue_configure() {
local host="${1}" local hostname="${1}"
local release="bookworm" local release="bookworm"
local package
# apt / conf # apt / conf
printf "\ printf "\
Acquire::AllowInsecureRepositories False; Acquire::AllowInsecureRepositories False;
@ -24,8 +25,9 @@ deb https://deb.debian.org/debian-security ${release}-security main non-free-fir
" >"/etc/apt/sources.list" " >"/etc/apt/sources.list"
# bash / rc # bash / rc
main_link_bashrc main_link_bashrc
mv .bashrc .bashrc.old
# host name # host name
hostname "${host}" hostname "${hostname}"
# locales # locales
printf "\ printf "\
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
@ -35,20 +37,27 @@ fr_FR.UTF-8 UTF-8
locale-gen locale-gen
# update catalog # update catalog
apt-get update apt-get update
# # disable frontend
debian_disable_frontend debian_disable_frontend
# install backports # install backports
set "tmux"
for package in "${@}"; do
echo ; echo "${package}"
apt-get install --assume-yes \ apt-get install --assume-yes \
--target-release "${release}-backports" \ --target-release "${release}-backports" \
"tmux" "${package}"
# clean cache
apt_clean_cache apt_clean_cache
done
# install packages # install packages
set "apt-file" "mosh" "byobu"
for package in "${@}"; do
echo ; echo "${package}"
apt-get install --assume-yes \ apt-get install --assume-yes \
"byobu" \ "${package}"
"mosh"
# clean cache
apt_clean_cache apt_clean_cache
done
# update catalog
apt-get update
} }
ovh_rescue_install() { ovh_rescue_install() {