From f14a0d31f51346e802d12f8f1b224e3f48160f05 Mon Sep 17 00:00:00 2001 From: Le0xFF <43521247+Le0xFF@users.noreply.github.com> Date: Wed, 27 Jul 2022 21:45:43 +0200 Subject: [PATCH] Fix unmoning encrypted partition when killing script and cosmetic changes --- vli.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vli.sh b/vli.sh index e84455c..68f8470 100755 --- a/vli.sh +++ b/vli.sh @@ -34,7 +34,7 @@ RED_LIGHT="\e[1;31m" function kill_script { - echo -e -n "\n\nKill signal captured, unmonting, cleaning and closing everything.\n\n" + echo -e -n "\n\n${RED_LIGHT}Kill signal captured, unmonting, cleaning and closing everything...${NORMAL}\n" if grep -q /dev/mapper /proc/mounts ; then if grep -q /mnt /proc/mounts ; then @@ -54,15 +54,15 @@ function kill_script { lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name" fi fi - cryptsetup close /dev/mapper/"$encrypted_name" fi + cryptsetup close /dev/mapper/"$encrypted_name" fi if [[ -f "$HOME"/chroot.sh ]] ; then rm -f "$HOME"/chroot.sh fi - echo -e -n "\n\nEverything's done, quitting.\n\n" + echo -e -n "\n${BLUE_LIGHT}Everything's done, quitting.${NORMAL}\n\n" exit 1 }