summaryrefslogtreecommitdiffstats
path: root/core/modules/vmware/data/etc/X11/Xreset.d/vmware
blob: 83bfb3927cb111766e703aafb5c6050ebbb3d5e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
#   VMWare cleanup
#

# Unmount dirs that vmware sometimes leaves around
VMWARE_TMP_DIRS="$(cat /proc/mounts | grep "/tmp/vmware-" | awk -F " " '{print $1}')"
for DIR in $VMWARE_TMP_DIRS; do
	umount "$DIR" && rmdir "$DIR"
done

# Delete redo/temp files that sometimes stay around e.g. on vmware crash
for file in $(find /tmp/virt/vmware -type f -size +4M); do
	fuser -s "$file" || rm -- "$file"
done

true