From d2ce7a1b74eeec4001e285fbffa586d47684830e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 11 Nov 2024 13:58:49 +0100 Subject: [PATCH] configure --- bash/ovh-rescue.sh | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/bash/ovh-rescue.sh b/bash/ovh-rescue.sh index 0acce32..a725271 100644 --- a/bash/ovh-rescue.sh +++ b/bash/ovh-rescue.sh @@ -1,8 +1,9 @@ #! /usr/bin/env sh ovh_rescue_configure() { - local host="${1}" + local hostname="${1}" local release="bookworm" + local package # apt / conf printf "\ Acquire::AllowInsecureRepositories False; @@ -24,8 +25,9 @@ deb https://deb.debian.org/debian-security ${release}-security main non-free-fir " >"/etc/apt/sources.list" # bash / rc main_link_bashrc + mv .bashrc .bashrc.old # host name - hostname "${host}" + hostname "${hostname}" # locales printf "\ en_US.UTF-8 UTF-8 @@ -35,20 +37,27 @@ fr_FR.UTF-8 UTF-8 locale-gen # update catalog apt-get update - # + # disable frontend debian_disable_frontend # install backports - apt-get install --assume-yes \ - --target-release "${release}-backports" \ - "tmux" - # clean cache - apt_clean_cache + set "tmux" + for package in "${@}"; do + echo ; echo "${package}" + apt-get install --assume-yes \ + --target-release "${release}-backports" \ + "${package}" + apt_clean_cache + done # install packages - apt-get install --assume-yes \ - "byobu" \ - "mosh" - # clean cache - apt_clean_cache + set "apt-file" "mosh" "byobu" + for package in "${@}"; do + echo ; echo "${package}" + apt-get install --assume-yes \ + "${package}" + apt_clean_cache + done + # update catalog + apt-get update } ovh_rescue_install() {