2024-01-22 18:24:27 +01:00
|
|
|
#/bin/bash
|
|
|
|
|
2024-01-22 18:43:04 +01:00
|
|
|
#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
|
|
|
|
|
2024-01-22 18:24:27 +01:00
|
|
|
echo "unlocking device cryptdata"
|
|
|
|
doas rc-service dmcrypt restart
|
|
|
|
doas vgchange -a y cryptdata
|
|
|
|
doas mount -a
|