mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 02:21:17 -03:00
Add if guard to the pvcreate
This commit is contained in:
parent
d0ffac92cb
commit
8d6363ba62
1 changed files with 5 additions and 4 deletions
|
|
@ -105,10 +105,11 @@ HEREDOC
|
|||
fi # if crypt volume is unable to open
|
||||
|
||||
# ----- Configure the LVM in LUKS volume -----
|
||||
# The swap volume and / volume is created here, based on the given parameters.
|
||||
# Create a Physical Volume and Volume Group.
|
||||
pvcreate /dev/mapper/${CRYPTPARTNAME}
|
||||
vgcreate ${VGNAME} /dev/mapper/${CRYPTPARTNAME}
|
||||
# Create a Physical Volume and Volume Group, if first time
|
||||
if [ ! -d /dev/${VGNAME} ]; then
|
||||
pvcreate /dev/mapper/${CRYPTPARTNAME}
|
||||
vgcreate ${VGNAME} /dev/mapper/${CRYPTPARTNAME}
|
||||
fi # if /dev/volume-groupt not exist
|
||||
|
||||
# Create a SWAP Logical Volume on VG, if it doesn't exist
|
||||
if [ -d /dev/mapper/${VGNAME}-${LVSWAPNAME} ] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue