Move LVM management to manage_part if/else test
This commit is contained in:
parent
68807f7e60
commit
265c4f8110
|
@ -91,9 +91,6 @@ if [ "${manage_part}" -eq 0 ]; then
|
|||
pvcreate "${hdd}${root_part_id}" || exit 3
|
||||
vgcreate "${vgname}" "${hdd}${root_part_id}" || exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
## }}}
|
||||
## Create Logical Volumes {{{
|
||||
if [ "${manage_btrfs}" -eq 0 ]; then
|
||||
|
@ -115,7 +112,8 @@ if [ "${manage_extra_lv}" -eq 0 ]; then
|
|||
[ ! -b /dev/mapper/"${vgname}"-bkp ] && lvcreate -n bkp -L 150g "${vgname}"
|
||||
fi
|
||||
[ ! -b /dev/mapper/"${vgname}"-swap ] && lvcreate -n swap -L 4g "${vgname}"
|
||||
|
||||
## }}}
|
||||
## Format Logical Volumes {{{
|
||||
### Format LVs in ext4
|
||||
cd -- /dev/"${vgname}" || exit 1
|
||||
for lvname in *; do
|
||||
|
@ -132,6 +130,8 @@ fi
|
|||
### And format the swap
|
||||
mkswap -L sw01 -- /dev/mapper/"${vgname}"-swap || exit 4
|
||||
## }}}
|
||||
|
||||
fi
|
||||
# }}}
|
||||
# Debootstrap {{{
|
||||
## Create and mount the system {{{
|
||||
|
|
Loading…
Reference in New Issue