This commit is contained in:
Marc Beninca 2024-11-11 14:40:55 +01:00
parent c7659c47fa
commit bee3710cde
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -18,10 +18,14 @@ Dpkg::Progress True;
" >"/etc/apt/apt.conf.d/apt.conf"
# apt / sources
printf "%s" "\
deb https://deb.debian.org/debian ${release} main non-free-firmware contrib non-free
deb https://deb.debian.org/debian ${release}-backports main non-free-firmware contrib non-free
deb https://deb.debian.org/debian ${release}-updates main non-free-firmware contrib non-free
deb https://deb.debian.org/debian-security ${release}-security main non-free-firmware contrib non-free
deb https://deb.debian.org/debian \
${release} main non-free-firmware contrib non-free
deb https://deb.debian.org/debian \
${release}-backports main non-free-firmware contrib non-free
deb https://deb.debian.org/debian \
${release}-updates main non-free-firmware contrib non-free
deb https://deb.debian.org/debian-security \
${release}-security main non-free-firmware contrib non-free
" >"/etc/apt/sources.list"
# bash / rc
main_link_bashrc
@ -106,7 +110,8 @@ ovh_rescue_install() {
ovh_rescue_upload() {
local host="${1}"
if [ "${host}" ]; then
local hostname="${2}"
if [ "${hostname}" ]; then
local user="root"
#
local user_host="${user}@${host}"
@ -117,11 +122,12 @@ ovh_rescue_upload() {
-o "StrictHostKeyChecking=accept-new" \
"${user_host}"
# upload root
rsync --delete --recursive "${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/"
rsync --delete --recursive \
"${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/"
# call setup
# TODO variable
ssh "${user_host}" -- \
"source \"/etc/bash/main.sh\" ; ovh_rescue_configure \"${host}\""
ssh "${user_host}" -- "\
source \"/etc/bash/main.sh\" ; ovh_rescue_configure \"${hostname}\""
# create session
ssh "${user_host}" -- byobu new-session -d
# send keys