DEVFSD(8)

NAME
devfsd - optional daemon for managing devfs (the Linux Device Filesystem)

SYNOPSIS
devfsd mntpnt [ -v ] [ -t ]

DESCRIPTION
The devfsd programme is a daemon, run by the system boot scripts which can provide for intelligent management of device entries in the Device Filesystem (devfs).

devfsd will read the special control file .devfsd in a mounted devfs, listening for the creation and removal of device entries (this is termed a change operation). For each change operation, devfsd can take many actions. The daemon will normally run itself in the background.

OPTIONS

mntpnt
    This specifies a mount point for where devfs is mounted. This is typically "/dev".

-v  This option will print the protocol version numbers for devfsd and the kernel-side protocol version provided by devfs itself. The programme then exits.

-t  Run devfsd in test mode. Used for debugging the kernel-side protocol implemented by devfs. This also prints the protocol version numbers. In this mode the daemon runs in the foreground.

CONFIGURATION
The configuration file /etc/devfsd.conf configures the devfsd programme. It is a simple ASCII file with one configuration option per line. Comment lines must start with a leading '#' character. Comment lines and blank lines are ignored. Each configuration option is a keyword followed by two or more parameters, depending on the option. The following section details the configuration options. Below are the permitted keywords:

PERMISSIONS devname owner_and_group access_mode
    This option allows you to set the permissions on a new device node. devname specifies the entry in the devfs namespace that has been created. There is no leading "/dev/". This is processed as a regular expression. owner_and_group specifies the owner and group that the file should be set to. This must be of the form "user.group" and either "user" or "group" component may be symbolic or numeric. access_mode specifies the access mode the file should be set to. This must be either an octal value or a symbolic string of nine characters with the form "rwxrwxrwx". Where access is not given, a '-' character should be used in place (e.g. "rw-rw-r--" gives read and write access to the user and group and only read access to everybody else).

REG_EXE devname path [arg...]
    This option allows you to run a programme when a device node is created. devname specifies the entry in the devfs namespace that has been created. There is no leading "/dev/". This is processed as a regular expression. path is the pathname of the programme to run and arg is a set of optional arguments passed to the programme (maximum 6). path is the first argument (i.e. argv[0]) passed to the programme. A subset of normal Bourne shell variable expansion is applied to the arguments. The currently supported subset is: $variable, ${variable} and ${variable:-word}. Variables are taken from the environment. In addition, the following variable names are recognised:

    devpath
        the full path name of the new device

    devname
        the name of the new device inside the devfs namespace

UNREG_EXE devname path [arg...]
    This option allows you to run a programme when a device node is deleted. The semantics are the same as for REG_EXE above.

ASYNC_OPEN_EXE devname path [arg...]
    This option allows you to run a programme when a device node is opened (i.e. when no other process has it open yet). The programme is run after the device has been opened. The semantics are the same as for REG_EXE above.

CLOSE_EXE devname path [arg...]
    This option allows you to run a programme when a device node is closed (i.e. the last process closes it). The programme is run after the device has been closed. The semantics are the same as for REG_EXE above.

SIGNALS
devfsd responds to signals in a variety of ways:

SIGINT
    devfsd will exit cleanly.

SIGTERM
    devfsd will exit cleanly.

SIGHUP
    The configuration file is re-read.

FILES
/etc/devfsd.conf
    the configuration file

SEE ALSO
init(8),

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABILITY
The Device Filesystem daemon is available from: http://www.atnf.csiro.au/~rgooch/linux/