makedev.d

Section: Linux System Administrator's Manual (5)
Updated: 1 November 2002
Page Index
 

NAME

makedev.d - configuration files for devices creation through makedev  

DESCRIPTION

The behavior of makedev is instrumented by the configuration files in /etc/makedev.d/ directory. They're read and "executed" by makedev(8) on post installation of the MAKEDEV package.

These configuration file consists of a set of lines.

All empty lines, and all text on a line after a '#', will be ignored.

The remaining lines should all conform to one of the following formats:  

SYNTAX

This is a description of the four basic legal directives.
=NAME expanded text
this define a macro. eg: =BURNER 660 root cdwriter will make makedev expand $BURNER when encountered.
b mask owner group major minor minor_step dev_number root_name base
this directive define some block (``b'') device(s) creation. They will be owned by owner and group and will have the major and minor as major and minor numbers.
The dev_number arguments define how many devices will be created. If dev_number is different from 1, then dev_number devices will be created, their minor number being incremented by minor_step at each step.
If only one device is created, it will be named root_name. Else, the devices will be named with regards to the following rules :
If root_name does not contains ``%d'', then ```%d'' is appended to its end.
If base is not set, it is initialized to zero.
Then, at each step, the name of the device we have to created is obtained by incrementing base and replacing ``%d'' by base. This is equivament to these statements : $base++; $file = sprintf($name, $base);
c mask owner group major minor minor_step dev_number root_name base
is quite the same directive as the previous one, exept its purpose is character devices (``c'') creation.
l destination source
will make makdev symlink source on destination.
 

CUSTOMIZATION

Since there is currently no standardization in what names are used for system users and groups, it is possible that you may need to modify makedev's configuration files to reflect your site's settings.  

EXAMPLES

# /etc/makedev.d/test sample
#

# the following line create (```c'') the famous /dev/null entry
# with 666 mask (file access permissions), with 1 as major and
# 3 as minor
c 666 root root         1   3  1  1 null


# the following line define the STORAGE macro that specify a 660
# mask for file permissions, root as owner and disk as group
=STORAGE  660 root disk

# the following line create 16 /dev/hdaX entries (/dev/hda0 to
# /dev/hda15) with the permissions and ownership defined above,
# and with 22 as major
b $STORAGE             22   0  1 16 hda%d

# this one link /dev/snd on alsa entry in procfs
# (usually mounted in /proc)
l snd ../proc/asound/dev

 

NOTES

The name of the file may contain some ``/'' characters : makdev will create the necessary directories if the node to create must be in a sub directory.
Comments must begin on first line character.
Files are parsed one by one, after having been sorted by name in alphabetical order.  

FILES

The /etc/makedev.d/* files contains instructions that instrument makdev to create the device files in /dev. Especially, /etc/makedev.d/00macros define most frequently used macros.  

SEE ALSO

Linux Allocated Devices, maintained by H. Peter Anvin, <Peter.Anvin@linux.org>.
It is ususally found in /usr/src/linux/Documentation/devices.txt if kernel-source package is installed or in /usr/share/doc/kernel-doc-<VERSION>/devices.txt if kernel-doc package is installed. <VERSION> is the version number of the installed kernel (eg: 2.4.19).

makedev(8)  

AUTHOR

Thierry Vignaud <tvignaud@mandrakesoft.com>, 2002

The device database is heavily inspirated by Redhat one.


 

Index

NAME
DESCRIPTION
SYNTAX
CUSTOMIZATION
EXAMPLES
NOTES
FILES
SEE ALSO
AUTHOR