Running a script after a device's been plugged

Lowell Gilbert freebsd-questions-local at
Sun Jul 4 15:25:54 UTC 2010

Samuel Martín Moro <faust64 at> writes:

> 3) Last but not least, how to link a device once it's plugged in, and unlink
> it once it's unplugged?
> We're still providing 5.4 and 6.2 releases based versions. And I do not like
> hal.
> So I thought I could use /etc/devd.conf, with attach/detach directives, and
> their actions calling a script that would create/delete the links.
> Is there a cleaner way to do it? Would it be still usable in 8.x? (9.x?)

That's exactly what devd is for.  Go ahead and use it.

More information about the freebsd-questions mailing list