From dc89ed224d530fe7dfae4272bdeea1b4386dee4b Mon Sep 17 00:00:00 2001 From: mfgbhatti Date: Sun, 20 Feb 2022 18:50:32 +0000 Subject: [PATCH] bug removal --- 0-preinstall.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 83ee156..40e9991 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -93,13 +93,14 @@ do_format() { do_lvm() { i=0 - while [[ "$i" -le "$LVM_PART_NUM" ]]; do - if [[ "$LVM_PART_NUM" -eq "1" ]]; then + while [[ "$i" -lt "$LVM_PART_NUM" ]]; do + if [[ "$p" -eq "1" ]]; then lvcreate --extents 100%FREE "$LVM_VG" --name "${LVM_NAMES[$i]}" else lvcreate --size "${LVM_SIZES[$i]}" "$LVM_VG" --name "${LVM_NAMES[$i]}" fi i=$((i + 1)) + p=$((LVM_PART_NUM - 1)) done }