This commit is contained in:
Marc Beninca 2024-11-29 18:55:34 +01:00
parent f1192c0c58
commit 04199bdfbb
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 11 additions and 11 deletions

View file

@ -1,4 +1,4 @@
rescue_configure() { rwx_rescue_configure() {
local hostname="${1}" local hostname="${1}"
# apt / conf # apt / conf
sh_apt_conf_write sh_apt_conf_write
@ -28,7 +28,7 @@ fr_FR.UTF-8 UTF-8
sh_apt_update sh_apt_update
} }
rescue_install() { rwx_rescue_install() {
# update catalog # update catalog
sh_apt_update sh_apt_update
# disable frontend # disable frontend
@ -51,7 +51,7 @@ rescue_install() {
"grub-efi-amd64-bin" "grub-efi-amd64-bin"
} }
rescue_upload() { rwx_rescue_upload() {
local host="${1}" local host="${1}"
local hostname="${2}" local hostname="${2}"
if [ -n "${hostname}" ]; then if [ -n "${hostname}" ]; then
@ -70,11 +70,11 @@ rescue_upload() {
# call setup # call setup
# TODO variable # TODO variable
ssh "${user_host}" -- \ ssh "${user_host}" -- \
". \"${ENV}\" ; rescue_configure \"${hostname}\"" ". \"${ENV}\" ; rwx_rescue_configure \"${hostname}\""
# create session # create session
ssh "${user_host}" -- byobu new-session -d ssh "${user_host}" -- byobu new-session -d
# send keys # send keys
ssh "${user_host}" -- byobu send-keys "rescue_install" "C-m" ssh "${user_host}" -- byobu send-keys "rwx_rescue_install" "C-m"
# attach session # attach session
mosh "${user_host}" -- byobu attach-session mosh "${user_host}" -- byobu attach-session
else else
@ -83,11 +83,11 @@ rescue_upload() {
fi fi
} }
rescue_wipe_1_zero() { rwx_rescue_wipe_1_zero() {
sh_fs_wipe "/dev/mapper/crypt" "512M" sh_fs_wipe "/dev/mapper/crypt" "512M"
} }
rescue_wipe_3_close() { rwx_rescue_wipe_3_close() {
umount "/media/boot" umount "/media/boot"
umount "/media/crypt" && umount "/media/crypt" &&
cryptsetup luksClose "crypt" cryptsetup luksClose "crypt"

View file

@ -1,4 +1,4 @@
rescue_wipe_0_init_hetzner_8_8() { rwx_rescue_wipe_0_init_hetzner_8_8() {
local device local device
set \ set \
"/dev/sda" \ "/dev/sda" \
@ -98,7 +98,7 @@ rescue_wipe_0_init_hetzner_8_8() {
unset passphrase unset passphrase
} }
rescue_wipe_2_make_hetzner_8_8() { rwx_rescue_wipe_2_make_hetzner_8_8() {
local passphrase local passphrase
# close # close
cryptsetup luksClose "crypt" cryptsetup luksClose "crypt"

View file

@ -1,4 +1,4 @@
rescue_wipe_0_init_ovh_vle2() { rwx_rescue_wipe_0_init_ovh_vle2() {
local device="/dev/sdb" local device="/dev/sdb"
local passphrase local passphrase
# read passphrase # read passphrase
@ -44,7 +44,7 @@ rescue_wipe_0_init_ovh_vle2() {
unset passphrase unset passphrase
} }
rescue_wipe_2_make_ovh_vle2() { rwx_rescue_wipe_2_make_ovh_vle2() {
local device="/dev/sdb" local device="/dev/sdb"
local passphrase local passphrase
# crypt / close # crypt / close