devfsd.conf(5)

NAME
/etc/devfsd.conf - the main configuration file for devfsd.

FORMAT
The main documentation for the format is in devfsd(8).

EXAMPLES
Here is some examples of the most common usage:

Compatibility entries, the following will create symbolic links from /dev/misc/device to /dev/device on node registration and remove them on unregistration:

REGISTER misc MKOLDCOMPAT

UNREGISTER misc RMOLDCOMPAT

The following means to ignore any REGISTER or CHANGE entries occurring later in the file for devices matching the regex ^pt[sy]/.*:

REGISTER    ^pt[sy]/.*    IGNORE

CHANGE    ^pt[sy]/.*    IGNORE

CREATE    ^pt[sy]/.*    IGNORE

This will copy the state of entries to /dev-state when it changes, and copy it back next time the device driver registers the node:

REGISTER    .*    COPY    /dev-state/$devname $devpath

CHANGE    .*    COPY    $devpath /dev-state/$devname

CREATE    .*    COPY    $devpath /dev-state/$devname

This runs modprobe on any LOOKUP operation, this means that any call to stat("/dev/foo", ...) will result in modprobe /dev/foo being run:

LOOKUP    .*    MODLOAD

This calls the GLOBAL function to create a symlink from /dev/tts/0 to /dev/ttyS0 and also to /dev/modem, the links will be removed at device unregistration time. The order of link creation is the reverse of the order in the config file.

REGISTER ^tts/0$ CFUNCTION GLOBAL symlink $devname modem

REGISTER ^tts/3$ CFUNCTION GLOBAL symlink $devname ttyS0

UNREGISTER ^tts/0$ CFUNCTION GLOBAL unlink modem

UNREGISTER ^tts/3$ CFUNCTION GLOBAL unlink ttyS0

The other use of CFUNCTION and MFUNCTION is to call a function in a shared object that devfsd will load. See the examples directory for code for some shared objects.

SEE ALSO
devfsd(8)