Add contrib/cleanup-tmp-mounts.sh

Useful when you have lots of broken mounts after something in
the test suite went wrong.
This commit is contained in:
Jakob Unterwurzacher 2020-02-15 14:38:13 +01:00
parent dc21cd3572
commit 747e994682
1 changed files with 15 additions and 0 deletions

15
contrib/cleanup-tmp-mounts.sh Executable file
View File

@ -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