summaryrefslogtreecommitdiff
path: root/cryptfs.in
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs.in')
-rw-r--r--cryptfs.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/cryptfs.in b/cryptfs.in
index b216eca..802b5f5 100644
--- a/cryptfs.in
+++ b/cryptfs.in
@@ -18,6 +18,18 @@ neededKeyFss="$(
fi
done
)"
+innermostFss="$(
+ for fs in ${cryptedFss}
+ do
+ echo "${fsTab}" | \
+ awk '{print $2}' | \
+ grep "^$(
+ echo "${fsTab}" | \
+ grep "^${fs}\s" | \
+ awk '{print $2}'
+ )/"
+ done
+)"
case $1 in
@@ -66,10 +78,26 @@ start)
fi
done
+ for innermostFs in ${innermostFss}
+ do
+ if ! mountpoint -q "${innermostFs}"
+ then
+ mount "${innermostFs}" || exit $?
+ fi
+ done
+
;;
stop)
+ for innermostFs in ${innermostFss}
+ do
+ if mountpoint -q "${innermostFs}"
+ then
+ umount "${innermostFs}" || exit $?
+ fi
+ done
+
for cryptedFs in ${cryptedFss}
do
if findmnt --source "${cryptedFs}" > /dev/null