Cleanup LVM section
This commit is contained in:
parent
da5fc031cc
commit
63fb701354
@ -761,7 +761,8 @@ part_menu()
|
|||||||
txt+="A $boot_fs efi boot partition (512M)\n- "
|
txt+="A $boot_fs efi boot partition (512M)\n- "
|
||||||
fi
|
fi
|
||||||
txt+="An ext4 partition using all remaining space ($root_size)\n\nDo you want to continue?\n"
|
txt+="An ext4 partition using all remaining space ($root_size)\n\nDo you want to continue?\n"
|
||||||
yesno "Auto Partition" "$txt" && part_auto "$device" "$table" "$boot_fs" "$root_size"
|
yesno "Auto Partition" "$txt" && msg "Info" "\nGathering device info.\n" 0 && part_auto "$device" "$table" "$boot_fs" "$root_size"
|
||||||
|
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
tput cnorm
|
tput cnorm
|
||||||
@ -1930,6 +1931,7 @@ prerun_systemd-boot()
|
|||||||
|
|
||||||
lvm_menu()
|
lvm_menu()
|
||||||
{
|
{
|
||||||
|
msg "Info" "\nGathering device info.\n" 0
|
||||||
is_bg_install || return 1
|
is_bg_install || return 1
|
||||||
lvm_detect
|
lvm_detect
|
||||||
local choice
|
local choice
|
||||||
@ -2025,14 +2027,14 @@ get_lv_size()
|
|||||||
lvm_mkgroup()
|
lvm_mkgroup()
|
||||||
{
|
{
|
||||||
local named=''
|
local named=''
|
||||||
local txt="\nConfirm creation of volume group: $VGROUP\n\nwith the following partition(s):"
|
|
||||||
|
|
||||||
until [[ $named ]]; do
|
until [[ $named ]]; do
|
||||||
lvm_partitions || return 1
|
lvm_partitions || return 1
|
||||||
lvm_group_name || return 1
|
lvm_group_name || return 1
|
||||||
yesno "$_lvmnew" "$txt $LVM_PARTS\n" && named=true
|
yesno "$_lvmnew" "\nConfirm creation of volume group: $VGROUP\n\nwith the following partition(s): $LVM_PARTS\n" && named=true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
msg "$_lvmnew" "\nCreating group: $VGROUP (${SIZE}$SIZE_UNIT)\n" 0
|
||||||
vgcreate -f "$VGROUP" $LVM_PARTS >/dev/null 2>$ERR
|
vgcreate -f "$VGROUP" $LVM_PARTS >/dev/null 2>$ERR
|
||||||
errshow "vgcreate -f $VGROUP $LVM_PARTS" || return 1
|
errshow "vgcreate -f $VGROUP $LVM_PARTS" || return 1
|
||||||
|
|
||||||
@ -2045,7 +2047,7 @@ lvm_mkgroup()
|
|||||||
VGROUP_MB=$SIZE
|
VGROUP_MB=$SIZE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg "$_lvmnew" "\nVolume group: $VGROUP ($SIZE $SIZE_UNIT) has been created\n"
|
msg "$_lvmnew" "\nVolume group: $VGROUP (${SIZE}$SIZE_UNIT) has been created\n"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2110,7 +2112,7 @@ lvm_group_name()
|
|||||||
dlg VGROUP input "$_lvmnew" "$_lvmvgname" "mygroup"
|
dlg VGROUP input "$_lvmnew" "$_lvmvgname" "mygroup"
|
||||||
if [[ -z $VGROUP ]]; then
|
if [[ -z $VGROUP ]]; then
|
||||||
return 1
|
return 1
|
||||||
elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || lsblk | grep -q "$VGROUP"; then
|
elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || vgdisplay | grep -q "$VGROUP"; then
|
||||||
msg "LVM Name Error" "$_lvmerrvgname"
|
msg "LVM Name Error" "$_lvmerrvgname"
|
||||||
VGROUP=''
|
VGROUP=''
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user