rescue
This commit is contained in:
parent
f1192c0c58
commit
04199bdfbb
3 changed files with 11 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
rescue_configure() {
|
||||
rwx_rescue_configure() {
|
||||
local hostname="${1}"
|
||||
# apt / conf
|
||||
sh_apt_conf_write
|
||||
|
@ -28,7 +28,7 @@ fr_FR.UTF-8 UTF-8
|
|||
sh_apt_update
|
||||
}
|
||||
|
||||
rescue_install() {
|
||||
rwx_rescue_install() {
|
||||
# update catalog
|
||||
sh_apt_update
|
||||
# disable frontend
|
||||
|
@ -51,7 +51,7 @@ rescue_install() {
|
|||
"grub-efi-amd64-bin"
|
||||
}
|
||||
|
||||
rescue_upload() {
|
||||
rwx_rescue_upload() {
|
||||
local host="${1}"
|
||||
local hostname="${2}"
|
||||
if [ -n "${hostname}" ]; then
|
||||
|
@ -70,11 +70,11 @@ rescue_upload() {
|
|||
# call setup
|
||||
# TODO variable
|
||||
ssh "${user_host}" -- \
|
||||
". \"${ENV}\" ; rescue_configure \"${hostname}\""
|
||||
". \"${ENV}\" ; rwx_rescue_configure \"${hostname}\""
|
||||
# create session
|
||||
ssh "${user_host}" -- byobu new-session -d
|
||||
# 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
|
||||
mosh "${user_host}" -- byobu attach-session
|
||||
else
|
||||
|
@ -83,11 +83,11 @@ rescue_upload() {
|
|||
fi
|
||||
}
|
||||
|
||||
rescue_wipe_1_zero() {
|
||||
rwx_rescue_wipe_1_zero() {
|
||||
sh_fs_wipe "/dev/mapper/crypt" "512M"
|
||||
}
|
||||
|
||||
rescue_wipe_3_close() {
|
||||
rwx_rescue_wipe_3_close() {
|
||||
umount "/media/boot"
|
||||
umount "/media/crypt" &&
|
||||
cryptsetup luksClose "crypt"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
rescue_wipe_0_init_hetzner_8_8() {
|
||||
rwx_rescue_wipe_0_init_hetzner_8_8() {
|
||||
local device
|
||||
set \
|
||||
"/dev/sda" \
|
||||
|
@ -98,7 +98,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
unset passphrase
|
||||
}
|
||||
|
||||
rescue_wipe_2_make_hetzner_8_8() {
|
||||
rwx_rescue_wipe_2_make_hetzner_8_8() {
|
||||
local passphrase
|
||||
# close
|
||||
cryptsetup luksClose "crypt"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
rescue_wipe_0_init_ovh_vle2() {
|
||||
rwx_rescue_wipe_0_init_ovh_vle2() {
|
||||
local device="/dev/sdb"
|
||||
local passphrase
|
||||
# read passphrase
|
||||
|
@ -44,7 +44,7 @@ rescue_wipe_0_init_ovh_vle2() {
|
|||
unset passphrase
|
||||
}
|
||||
|
||||
rescue_wipe_2_make_ovh_vle2() {
|
||||
rwx_rescue_wipe_2_make_ovh_vle2() {
|
||||
local device="/dev/sdb"
|
||||
local passphrase
|
||||
# crypt / close
|
||||
|
|
Loading…
Reference in a new issue