mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 02:21:17 -03:00
Add volume closing on duplicate LV name.
This commit is contained in:
parent
3387dc940d
commit
7ebd7fc535
1 changed files with 7 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ function pre_install() {
|
||||||
# Check volume group ${VGNAME} exist or not
|
# Check volume group ${VGNAME} exist or not
|
||||||
if vgdisplay -s ${VGNAME} &> /dev/null ; then # if exist
|
if vgdisplay -s ${VGNAME} &> /dev/null ; then # if exist
|
||||||
echo "...Volume group ${VGNAME} already exist. Skipped to create. No problem."
|
echo "...Volume group ${VGNAME} already exist. Skipped to create. No problem."
|
||||||
echo "...Activate all logical volume in volume group ${VGNAME}."
|
echo "...Activate all logical volumes in volume group ${VGNAME}."
|
||||||
vgchange -ay
|
vgchange -ay
|
||||||
else
|
else
|
||||||
echo "...Initialize a physical volume on \"${CRYPTPARTNAME}\""
|
echo "...Initialize a physical volume on \"${CRYPTPARTNAME}\""
|
||||||
|
|
@ -83,6 +83,12 @@ function pre_install() {
|
||||||
cat <<- HEREDOC 1>&2
|
cat <<- HEREDOC 1>&2
|
||||||
***** ERROR : Logical volume "${VGNAME}-${LVROOTNAME}" already exists. *****
|
***** ERROR : Logical volume "${VGNAME}-${LVROOTNAME}" already exists. *****
|
||||||
...Check LVROOTNAME environment variable in config.txt.
|
...Check LVROOTNAME environment variable in config.txt.
|
||||||
|
HEREDOC
|
||||||
|
echo "...Deactivate all logical volumes in volume group \"${VGNAME}\"."
|
||||||
|
vgchange -a n ${VGNAME}
|
||||||
|
echo "...Close LUKS volume \"${CRYPTPARTNAME}\"."
|
||||||
|
cryptsetup close ${CRYPTPARTNAME}
|
||||||
|
cat <<- HEREDOC 1>&2
|
||||||
|
|
||||||
...Installation process terminated..
|
...Installation process terminated..
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue