mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-10-26 20:35:50 +03:00
Fix function called when trapping signals
This commit is contained in:
parent
c51938b1a0
commit
a5d208968a
5
vli.sh
5
vli.sh
@ -36,21 +36,26 @@ function kill_script {
|
||||
|
||||
echo -e -n "\n\nKill signal captured, unmonting, cleaning and closing everything.\n\n"
|
||||
|
||||
if grep -q /mnt /proc/mounts ; then
|
||||
for dir in sys dev proc ; do
|
||||
umount /mnt/$dir
|
||||
done
|
||||
umount -l /mnt/home
|
||||
umount -l /mnt
|
||||
if [[ "$lvm_yn" == "y" ]] || [[ "$lvm_yn" == "Y" ]] ; then
|
||||
if [[ -n "$lv_root_name" ]] ; then
|
||||
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
||||
fi
|
||||
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"
|
||||
exit 1
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user