vermaden / automount

Simple devd(8) based automounter for FreeBSD
66 stars 20 forks source link

detach of a da* device does not call umount -f #11

Closed leper closed 5 years ago

leper commented 5 years ago

Using 1.6.0 on FreeBSD 12.0 I encountered an issue where a da* device (USB key with msdos partition table and one fat32 partition) did not get unmounted after unplugging.

Patching the script to call umount -f "${MNTPREFIX}/${1}" after the grep-while loop fixes this. I didn't quite dig into the issue, but it seems the loop body is never run. I suspect this might be caused by the state file just containing (typing from memory, not at that box right now) da0s1 /path/to/mount/da0s1 which could cause the read to fail, which might cause the body to never be executed.

vermaden commented 5 years ago

Fixed: https://github.com/vermaden/automount/commit/cf10b9627df1409ef8db8a19653809113591556f

Thank You for submitting the BUG and fix.

Regards :)