dmount/dmount.sh

32 lines
650 B
Bash
Raw Normal View History

#/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
doas mount -a