From 5cbe95252ce0de221854e30625e63504cdf171a3 Mon Sep 17 00:00:00 2001 From: Suikan <26223147+suikan4github@users.noreply.github.com> Date: Fri, 2 Jul 2021 13:56:48 +0900 Subject: [PATCH] Add volume closing process on unexpected finijsh of GUI/TUI installer. --- script/common/parainstall.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/common/parainstall.sh b/script/common/parainstall.sh index 88d149f..965e903 100644 --- a/script/common/parainstall.sh +++ b/script/common/parainstall.sh @@ -14,12 +14,17 @@ function parainstall() { # Check if installer still exist if ! ps $INSTALLER_PID > /dev/null ; then # If not exists cat <<-HEREDOC 1>&2 - ...The installer terminated unexpectedly. + ***** ERROR : The GUI/TUI installer terminated unexpectedly. ***** ...Delete the new logical volume "${VGNAME}-${LVROOTNAME}". HEREDOC lvremove -f /dev/mapper/${VGNAME}-${LVROOTNAME} + 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 + ...The new logical volume is deleted. You can start Kaiten-yaki again. ...Installation process terminated. HEREDOC return 1 # with error status