vim:crypt-umount(): Continue if already unmounted

This commit is contained in:
2020-12-23 19:53:28 +01:00
parent 03b6ba72ae
commit 6e29b8b51a

View File

@@ -265,7 +265,10 @@ crypt-umount() {
[[ -e "$1" ]] || return 1
sync
if ! udisksctl unmount -b /dev/mapper/crypt_"${1##*/}"; then
if
mount | grep -q /dev/mapper/crypt_"${1##*/}" \
&& ! udisksctl unmount -b /dev/mapper/crypt_"${1##*/}"
then
lsof /dev/mapper/crypt_"${1##*/}"
return 1
fi