mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-08-17 14:40:22 +03:00
Trying to fix kill_script function once again
This commit is contained in:
parent
791ce7fcbb
commit
6dd6c11e93
25
vli.sh
25
vli.sh
@ -37,25 +37,18 @@ function kill_script {
|
||||
echo -e -n "\n\n${RED_LIGHT}Kill signal captured, unmonting, cleaning and closing everything...${NORMAL}\n"
|
||||
|
||||
if [[ -b /dev/mapper/"$encrypted_name" ]] ; then
|
||||
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
|
||||
if [[ -b /dev/mapper/"$vg_name" ]] ; then
|
||||
if grep -q /mnt /proc/mounts ; then
|
||||
for dir in sys dev proc ; do
|
||||
umount /mnt/$dir
|
||||
done
|
||||
umount /mnt/home
|
||||
umount /mnt
|
||||
if [[ -b /dev/mapper/"$vg_name"-"$lv_root_name" ]] ; then
|
||||
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
||||
else
|
||||
vgchange -an /dev/mapper/"$vg_name"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
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
|
||||
vgchange -an /dev/mapper/"$vg_name"
|
||||
fi
|
||||
cryptsetup close /dev/mapper/"$encrypted_name"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user