devices
This commit is contained in:
parent
d028d83f7a
commit
8d53e86bcd
1 changed files with 12 additions and 13 deletions
|
@ -1,9 +1,8 @@
|
|||
rescue_wipe_0_init_hetzner_8_8() {
|
||||
local device
|
||||
local devices=(
|
||||
"/dev/sda"
|
||||
set \
|
||||
"/dev/sda" \
|
||||
"/dev/sdb"
|
||||
)
|
||||
local members
|
||||
local number
|
||||
local passphrase
|
||||
|
@ -11,11 +10,11 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
passphrase="$(read_passphrase)"
|
||||
#
|
||||
lsblk
|
||||
echo -n "WIPE" "${devices[@]}" "/?\\ OR CANCEL /!\\"
|
||||
echo -n "WIPE" "${@}" "/?\\ OR CANCEL /!\\"
|
||||
read -r
|
||||
#
|
||||
number=0
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
number=$((number + 1))
|
||||
echo
|
||||
echo "#${number}: ${device}"
|
||||
|
@ -32,7 +31,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
done
|
||||
#
|
||||
number=0
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
number=$((number + 1))
|
||||
echo
|
||||
echo "#${number}: ${device}4"
|
||||
|
@ -41,7 +40,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
done
|
||||
#
|
||||
number=0
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
number=$((number + 1))
|
||||
echo
|
||||
echo "#${number}: ${device}3"
|
||||
|
@ -54,7 +53,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
done
|
||||
#
|
||||
number=0
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
number=$((number + 1))
|
||||
echo
|
||||
echo "#${number}: ${device}2"
|
||||
|
@ -63,7 +62,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
done
|
||||
#
|
||||
members=()
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
members+=("${device}2")
|
||||
done
|
||||
mdadm \
|
||||
|
@ -71,7 +70,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
--level 0 \
|
||||
--metadata 1 \
|
||||
--name "md:boot" \
|
||||
--raid-devices ${#devices[@]} \
|
||||
--raid-devices ${#} \
|
||||
--uuid "00000000:00000000:00000000:00000002" \
|
||||
"${members[@]}"
|
||||
#
|
||||
|
@ -84,7 +83,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
"/dev/md/boot" "/media/boot"
|
||||
#
|
||||
number=0
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
number=$((number + 1))
|
||||
echo
|
||||
echo "#${number}: ${device}1"
|
||||
|
@ -93,7 +92,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
done
|
||||
#
|
||||
members=()
|
||||
for device in "${devices[@]}"; do
|
||||
for device in "${@}"; do
|
||||
members+=("${device}1")
|
||||
done
|
||||
mdadm \
|
||||
|
@ -101,7 +100,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
--level 0 \
|
||||
--metadata 1 \
|
||||
--name "md:crypt" \
|
||||
--raid-devices ${#devices[@]} \
|
||||
--raid-devices ${#} \
|
||||
--uuid "00000000:00000000:00000000:00000001" \
|
||||
"${members[@]}"
|
||||
# encrypt
|
||||
|
|
Loading…
Reference in a new issue