diff --git a/dmount.sh b/dmount.sh index 0920c7e..24e9d49 100755 --- a/dmount.sh +++ b/dmount.sh @@ -1,5 +1,30 @@ #/bin/bash +#def constantes. + +Version=1.0.0 +Usage="dmount.sh [PARAMETTER] + +Permit to mount an LVM on LUKS device when you have already added to /etc/fstab all volumes. + +PARAMETER + -h, --help Print this help and exit + -v, --version Print the version of this program and exit + " + +for i in $@; do + case "$i" in + "-h" | "--help") + echo "${Usage}" + exit 0 + ;; + "-v" | "--version") + echo "dmount.sh v.${Version}" + exit 0 + ;; + esac +done + echo "unlocking device cryptdata" doas rc-service dmcrypt restart doas vgchange -a y cryptdata diff --git a/dumount.sh b/dumount.sh index 048920e..c682e1f 100755 --- a/dumount.sh +++ b/dumount.sh @@ -1,5 +1,33 @@ #/bin/bash + +Version=1.0.0 +Usage="dumount.sh [PARAMETTER] + +Umount a LVM on LUKS device. In case it was unplugged without being unmounted, use dmsetup tu force the deactivation of the lvm drive. + +PARAMETER + -h, --help Print this help and exit + -v, --version Print the version of this program and exit + " + +for i in $@; do + case "$i" in + "-h" | "--help") + echo "${Usage}" + exit 0 + ;; + "-v" | "--version") + echo "dmount.sh v.${Version}" + exit 0 + ;; + esac +done + + + + + MOUNTPOINT_cours=/home/primardj/cours MOUNTPOINT_doc=/home/primardj/Documents MOUNTPOINT_virt_machine=/home/primardj/virtual_machine