diff options
author | Jakob Unterwurzacher | 2020-02-15 14:38:13 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2020-02-15 14:38:13 +0100 |
commit | 747e99468237caeded8d63741b59393cbbbdfc08 (patch) | |
tree | 85ea022a25022368e9ff24c19df8daa7d1f7b0ef /contrib/cleanup-tmp-mounts.sh | |
parent | dc21cd357258df775e67a36cbcd70fc5f83543ad (diff) |
Add contrib/cleanup-tmp-mounts.sh
Useful when you have lots of broken mounts after something in
the test suite went wrong.
Diffstat (limited to 'contrib/cleanup-tmp-mounts.sh')
-rwxr-xr-x | contrib/cleanup-tmp-mounts.sh | 15 |
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 |