aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/cleanup-tmp-mounts.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/cleanup-tmp-mounts.sh b/contrib/cleanup-tmp-mounts.sh
new file mode 100755
index 0000000..2429569
--- /dev/null
+++ b/contrib/cleanup-tmp-mounts.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# Umount all FUSE filesystems mounted below /tmp and /var/tmp.
+#
+# Useful when you have lots of broken mounts after something in
+# the test suite went wrong.
+
+set -eu
+
+MOUNTS=$(mount | grep ' type fuse\.' | grep 'on /var/tmp/\|on /tmp/' | cut -d' ' -f 3)
+
+for i in $MOUNTS ; do
+ echo "Unmounting $i"
+ fusermount -u -z "$i"
+done