From e3e35995611120680650e998c8bba16e88ba77d3 Mon Sep 17 00:00:00 2001 From: Suikan <26223147+suikan4github@users.noreply.github.com> Date: Sun, 4 Jul 2021 22:00:55 +0900 Subject: [PATCH] Add error handling on lvcreate root --- script/lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/lib.sh b/script/lib.sh index c9c207e..82b0ffc 100644 --- a/script/lib.sh +++ b/script/lib.sh @@ -240,6 +240,7 @@ function pre_install() { else # not exist and not overwrite install echo "...Creating logical volume \"${LVROOTNAME}\" on \"${VGNAME}\"." lvcreate -l "${LVROOTSIZE}" -n "${LVROOTNAME}" "${VGNAME}" + if [ $? -ne 0 ] ; then deactivate_and_close; return 1 ; fi; fi fi