mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-09-11 18:47:17 +03:00
Learn how to use --recursove with umount
This commit is contained in:
parent
898f591d68
commit
94a71a6278
20
vli.sh
20
vli.sh
@ -34,18 +34,15 @@ RED_LIGHT="\e[1;31m"
|
|||||||
|
|
||||||
function kill_script {
|
function kill_script {
|
||||||
|
|
||||||
echo -e -n "\n\n${RED_LIGHT}Kill signal captured.\nUnmonting what should have been mounted, cleaning and closing everything...${NORMAL}\n"
|
echo -e -n "\n\n${RED_LIGHT}Kill signal captured.\nUnmonting what should have been mounted, cleaning and closing everything...${NORMAL}\n\n"
|
||||||
|
|
||||||
for dir in sys dev proc ; do
|
umount --recursive /mnt
|
||||||
umount /mnt/$dir
|
|
||||||
done
|
|
||||||
umount /mnt/boot/efi
|
|
||||||
umount /mnt/home
|
|
||||||
umount /mnt
|
|
||||||
if [[ "$lvm_yn" == "y" ]] || [[ "$lvm_yn" == "Y" ]] ; then
|
if [[ "$lvm_yn" == "y" ]] || [[ "$lvm_yn" == "Y" ]] ; then
|
||||||
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
||||||
vgchange -an /dev/mapper/"$vg_name"
|
vgchange -an /dev/mapper/"$vg_name"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cryptsetup close /dev/mapper/"$encrypted_name"
|
cryptsetup close /dev/mapper/"$encrypted_name"
|
||||||
|
|
||||||
if [[ -f "$HOME"/chroot.sh ]] ; then
|
if [[ -f "$HOME"/chroot.sh ]] ; then
|
||||||
@ -1350,13 +1347,10 @@ function install_base_system_and_chroot {
|
|||||||
rm -f /mnt/home/root/chroot.sh
|
rm -f /mnt/home/root/chroot.sh
|
||||||
|
|
||||||
echo -e -n "\nUnmounting partitions...\n\n"
|
echo -e -n "\nUnmounting partitions...\n\n"
|
||||||
for dir in sys dev proc ; do
|
umount --recursive /mnt
|
||||||
umount /mnt/$dir
|
|
||||||
done
|
|
||||||
umount -l /mnt/home
|
|
||||||
umount -l /mnt
|
|
||||||
if [[ "$lvm_yn" == "y" ]] || [[ "$lvm_yn" == "Y" ]] ; then
|
if [[ "$lvm_yn" == "y" ]] || [[ "$lvm_yn" == "Y" ]] ; then
|
||||||
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
lvchange -an /dev/mapper/"$vg_name"-"$lv_root_name"
|
||||||
|
vgchange -an /dev/mapper/"$vg_name"
|
||||||
fi
|
fi
|
||||||
cryptsetup close /dev/mapper/"$encrypted_name"
|
cryptsetup close /dev/mapper/"$encrypted_name"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user