mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-08-17 14:40:22 +03:00
Fix function called when trapping signals
This commit is contained in:
parent
c51938b1a0
commit
a5d208968a
21
vli.sh
21
vli.sh
@ -36,21 +36,26 @@ function kill_script {
|
||||
|
||||
echo -e -n "\n\nKill signal captured, unmonting, cleaning and closing everything.\n\n"
|
||||
|
||||
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
|
||||
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
||||
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
|
||||
cryptsetup close /dev/mapper/"$encrypted_name"
|
||||
|
||||
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