19 lines
512 B
Plaintext
19 lines
512 B
Plaintext
|
--- scripts/umount.crypt
|
||
|
+++ scripts/umount.crypt 2007/01/12 08:59:14
|
||
|
@@ -57,6 +57,15 @@
|
||
|
exit 1;
|
||
|
fi;
|
||
|
|
||
|
+# kill remaining user processes if we're unmounting a user's home dir
|
||
|
+getent passwd | grep -e ":$1:" &> /dev/null
|
||
|
+if test $? -eq 0; then
|
||
|
+ lsof -t $1 | xargs kill -TERM &> /dev/null
|
||
|
+ sleep 1
|
||
|
+ lsof -t $1 | xargs kill -9 &> /dev/null
|
||
|
+ sleep 1
|
||
|
+fi
|
||
|
+
|
||
|
# ask cryptsetup about the underlying device
|
||
|
#
|
||
|
REALDEVICE=` "$CRYPTSETUP" status "$DMDEVICE" | sed -n '/device/s/[ ]*device:[ ]*//p'`;
|