Add error handling on lvcreate root

This commit is contained in:
Suikan 2021-07-04 22:00:55 +09:00
parent 95d8c6f62c
commit e3e3599561

View file

@ -240,6 +240,7 @@ function pre_install() {
else # not exist and not overwrite install else # not exist and not overwrite install
echo "...Creating logical volume \"${LVROOTNAME}\" on \"${VGNAME}\"." echo "...Creating logical volume \"${LVROOTNAME}\" on \"${VGNAME}\"."
lvcreate -l "${LVROOTSIZE}" -n "${LVROOTNAME}" "${VGNAME}" lvcreate -l "${LVROOTSIZE}" -n "${LVROOTNAME}" "${VGNAME}"
if [ $? -ne 0 ] ; then deactivate_and_close; return 1 ; fi;
fi fi
fi fi