aboutsummaryrefslogtreecommitdiff
path: root/contrib/cleanup-tmp-mounts.sh
blob: 481d2b7b9ddae51f6564e82adac6d555763fb8da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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/\|on /mnt/ext4-ramdisk/' | cut -d' ' -f 3)

for i in $MOUNTS ; do
	echo "Unmounting $i"
	fusermount -u -z "$i"
done