List open files when unmount fails

This commit is contained in:
2020-08-22 16:21:37 +02:00
parent 1ca16d248d
commit bcd23681ce

View File

@@ -327,6 +327,9 @@ safe-remove() {
[ -e "$1" ] || return 1
sync
udisksctl unmount -b "$1" || return 1
if ! udisksctl unmount -b "$1"; then
lsof "$1"
return 1
fi
udisksctl power-off -b "/dev/$(lsblk -no pkname "$1")"
}