From 33e823024cc1318f47928fd6b57310a7119c8ec3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 11 Nov 2024 16:48:26 +0100 Subject: [PATCH] ovh --- bash/rescue-ovh.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bash/rescue-ovh.sh b/bash/rescue-ovh.sh index f639df5..a98e8f7 100644 --- a/bash/rescue-ovh.sh +++ b/bash/rescue-ovh.sh @@ -1,6 +1,6 @@ #! /usr/bin/env sh -ovh_rescue_configure() { +rescue_ovh_configure() { local hostname="${1}" local release="bookworm" local package @@ -66,7 +66,7 @@ fr_FR.UTF-8 UTF-8 apt-get update } -ovh_rescue_install() { +rescue_ovh_install() { local package local release="bookworm" # update catalog @@ -108,7 +108,7 @@ ovh_rescue_install() { done } -ovh_rescue_upload() { +rescue_ovh_upload() { local host="${1}" local hostname="${2}" if [ "${hostname}" ]; then @@ -127,11 +127,11 @@ ovh_rescue_upload() { # call setup # TODO variable ssh "${user_host}" -- "\ -source \"/etc/bash/main.sh\" ; ovh_rescue_configure \"${hostname}\"" +source \"/etc/bash/main.sh\" ; rescue_ovh_configure \"${hostname}\"" # create session ssh "${user_host}" -- byobu new-session -d # send keys - ssh "${user_host}" -- byobu send-keys "ovh_rescue_install" "C-m" + ssh "${user_host}" -- byobu send-keys "rescue_ovh_install" "C-m" # attach session mosh "${user_host}" -- byobu attach-session else @@ -140,7 +140,7 @@ source \"/etc/bash/main.sh\" ; ovh_rescue_configure \"${hostname}\"" fi } -ovh_rescue_wipe_vle2_0_init() { +rescue_ovh_wipe_vle2_0_init() { local device="/dev/sdb" local passphrase local unit="mib" @@ -210,12 +210,12 @@ ovh_rescue_wipe_vle2_0_init() { cryptsetup luksOpen "${device}1" "crypt" } -ovh_rescue_wipe_vle2_1_zero() { +rescue_ovh_wipe_vle2_1_zero() { # crypt / zero dd status="progress" if="/dev/zero" of="/dev/mapper/crypt" bs="1G" } -ovh_rescue_wipe_vle2_2_make() { +rescue_ovh_wipe_vle2_2_make() { local passphrase # crypt / close cryptsetup luksClose "crypt" @@ -256,7 +256,7 @@ ovh_rescue_wipe_vle2_2_make() { "/media/crypt/swap" } -ovh_rescue_wipe_vle2_3_close() { +rescue_ovh_wipe_vle2_3_close() { umount "/media/boot" umount "/media/crypt" && cryptsetup luksClose "crypt"