vermaden / automount

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

REMOVEDIRS does not remove all /media dirs after unmount/unplug #40

Closed probonopd closed 2 years ago

probonopd commented 2 years ago

https://github.com/vermaden/automount/commit/2a1f2a29725165d7dc4c422849668546fab010da introduced REMOVEDIRS:

REMOVEDIRS (set to YES by default) If set to YES the automount(8) will remove /media dir after unmount.

Apparently, this currently only works if /usr/local/sbin/automount is doing the unmounting.

If the user just unplugs the device or unmounts by hand, then the mount point is not removed.

This can lead to leftover empty mountpoints, which can be quite messy over time in /media. Could automount catch the respective devd messages and clean up the extraneous directories?

Thanks @decuser for pointing this out.

vermaden commented 2 years ago

I will look into that.

vermaden commented 2 years ago

I think that I fixed that one too.

Details: https://github.com/vermaden/automount/commit/466712252a57ca0963a98880579714767d36c39d

Regards.

probonopd commented 2 years ago

Awesome! :+1: Thank you very much @vermaden