change mecanism of umount
This commit is contained in:
parent
42671a7e52
commit
e9bc79f735
1 changed files with 17 additions and 1 deletions
18
dmount
18
dmount
|
@ -15,6 +15,11 @@ PARAMETRES
|
||||||
-r, --recover Permit to recover from a state where the ssd where hot unplug to an unplug state.
|
-r, --recover Permit to recover from a state where the ssd where hot unplug to an unplug state.
|
||||||
"
|
"
|
||||||
|
|
||||||
|
Mountpoint_cours=/home/primardj/cours
|
||||||
|
Mountpoint_doc=/home/primardj/Documents
|
||||||
|
Mountpoint_virt_machine=/home/primardj/virtual_machine
|
||||||
|
Mountpoint_data=/home/primardj/data
|
||||||
|
|
||||||
force_remove_vgdevice() {
|
force_remove_vgdevice() {
|
||||||
echo "force remove vg cryptdata"
|
echo "force remove vg cryptdata"
|
||||||
doas dmsetup info --columns
|
doas dmsetup info --columns
|
||||||
|
@ -30,9 +35,20 @@ mount_lvm_on_luks() {
|
||||||
doas mount -a
|
doas mount -a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
umount_devices() {
|
||||||
|
echo "umount devices"
|
||||||
|
doas umount -R $Mountpoint_cours
|
||||||
|
doas umount -R $Mountpoint_doc
|
||||||
|
doas umount -R $Mountpoint_virt_machine
|
||||||
|
doas umount -R $Mountpoint_data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
umount_lvm_on_luks() {
|
umount_lvm_on_luks() {
|
||||||
echo "locking device cryptdata"
|
echo "locking device cryptdata"
|
||||||
doas umount -R /home/primardj || echo "Error, can't umount devices" >&2 && exit 0
|
umount_devices || echo "Error; can't umount devices" >&2 && exit 0
|
||||||
|
|
||||||
|
#doas umount -R /home/primardj || echo "Error, can't umount devices" >&2 && exit 0
|
||||||
doas lvchange -a n cryptdata || force_remove_vgdevice
|
doas lvchange -a n cryptdata || force_remove_vgdevice
|
||||||
doas cryptsetup close cryptdata
|
doas cryptsetup close cryptdata
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue