From 78c0b47e44923792c3deac022e1d839e9062e099 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 14 Jul 2016 21:00:09 +0200 Subject: innermostFs neu --- cryptfs.in | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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 -- cgit v1.2.3-70-g09d2