summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-07-14 21:00:09 +0200
committerErich Eckner <git@eckner.net>2016-07-14 21:00:09 +0200
commit78c0b47e44923792c3deac022e1d839e9062e099 (patch)
tree686165fbcf3c3474eaafee40f853d1859b5f8a46
parentd895b10e378c883fa6196c815bbdd4e656614084 (diff)
downloadcryptfs-daemon-78c0b47e44923792c3deac022e1d839e9062e099.tar.xz
innermostFs neu
-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