remove recover options. Add it to umount option

This commit is contained in:
primardj 2024-01-23 17:32:12 +00:00
parent b780ac75ae
commit 7e5e472c65

7
dmount
View file

@ -12,7 +12,6 @@ PARAMETRES
-v, --version Print the version and exit
-m, --mount Mount cryptdata
-u, --umount Unmount cryptdata
-r, --recover Permit to recover from a state where the ssd where hot unplug to an unplug state.
"
Mountpoint_cours=/home/primardj/cours
@ -68,7 +67,7 @@ umount_lvm_on_luks() {
echo "locking device cryptdata"
umount_devices || error_umount
doas lvchange -a n cryptdata || force_remove_vgdevice
doas lvchange -a n cryptdata || error_deactivate_vg
doas cryptsetup close cryptdata
}
@ -92,9 +91,5 @@ for i in "$@"; do
umount_lvm_on_luks
exit 0
;;
"-r" | "--recover")
force_remove_vgdevice
exit 0
;;
esac
done