vermaden / automount

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

Option to blacklist devices by regex #46

Closed maxsteciuk closed 10 months ago

maxsteciuk commented 1 year ago

I noticed automount received each partition as a device node. To black list entire device from mounting one needs to lists all partitions as part of BLACKLIST option. I am proposing an additional option to match all of the partitions of the device : regex match in addition to exact match. I thought about leaving existing behavior of BLACKLIST configuration in case someone wants to list ignored devices explicitly.

Please see sample log for the configuration:

BLACKLIST='ada0'
BLACKLIST_REGEX=true
2023-01-16 14:07:54 /dev/ada0p1: device blocked by BLACKLIST regex option
2023-01-16 14:07:54 /dev/ada0p2: device blocked by BLACKLIST regex option
vermaden commented 1 year ago

Hi,

good proposal - I will merge it with some minor modifications.

Just give me some time - weekend is more generous when it comes to time :)

Regards.

vermaden commented 1 year ago

Periodic reminder that I still has it in my TODO list :)

vermaden commented 1 year ago

Sorry for being really late on this one.

Implemented along with several other fixes/features.

Please test:

Regards, vermaden

maxsteciuk commented 10 months ago

Sorry for delay, I retested and the fix works. Thank you!

vermaden commented 10 months ago

I believe your delay was similar to mine :)

Regards, vermaden