functions

This commit is contained in:
Marc Beninca 2024-11-11 16:57:37 +01:00
parent 5f13535022
commit 783d5e334e
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,4 +1,4 @@
function rescue_hetzner_configure {
rescue_hetzner_configure() {
local hostname="${1}"
local package
local packages=(
@ -53,7 +53,7 @@ fr_FR.UTF-8 UTF-8
apt-get update
}
function rescue_hetzner_install {
rescue_hetzner_install() {
local package
local release='bookworm'
local packages=(
@ -100,7 +100,7 @@ function rescue_hetzner_install {
done
}
function rescue_hetzner_upload {
rescue_hetzner_upload() {
local host="${1}"
local hostname="${2}"
if [ "${hostname}" ] ; then
@ -130,7 +130,7 @@ else
fi
}
function rescue_hetzner_wipe_8_8_0_init {
rescue_hetzner_wipe_8_8_0_init() {
local device
local devices=(
'/dev/sda'
@ -270,13 +270,13 @@ function rescue_hetzner_wipe_8_8_0_init {
| cryptsetup luksOpen '/dev/md/crypt' 'crypt'
}
function rescue_hetzner_wipe_8_8_1_zero {
rescue_hetzner_wipe_8_8_1_zero() {
# wipe crypt
dd status='progress' \
if='/dev/zero' of='/dev/mapper/crypt' bs='8G'
}
function rescue_hetzner_wipe_8_8_2_make {
rescue_hetzner_wipe_8_8_2_make() {
local passphrase
# close
cryptsetup luksClose 'crypt'
@ -318,7 +318,7 @@ function rescue_hetzner_wipe_8_8_2_make {
'/media/crypt/swap'
}
function rescue_hetzner_wipe_8_8_3_close {
rescue_hetzner_wipe_8_8_3_close() {
umount '/media/boot'
#
umount '/media/crypt' \