.\" Copyright (c) 2002 Thierry Vignaud .\" Copyright (c) 2010 Hans de Goede .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" .TH makedev.d 5 "1 June 2010" "Red Hat Linux" "Linux System Administrator's Manual" .SH NAME makedev.d \- configuration files for devices creation through MAKEDEV .\".SH SYNOPSIS .SH DESCRIPTION The behavior of .B MAKEDEV is instrumented by the configuration files in .I /etc/makedev.d/ directory. They're read and "executed" by .BR MAKEDEV(8) on post installation of the MAKEDEV package. .PP These configuration file consists of a set of lines. .PP All empty lines, and all text on a line after a '#', will be ignored. .PP The remaining lines should all conform to one of the following formats: .SH SYNTAX This is a description of the four basic legal directives. .TP .B =NAME expanded text this define a macro. eg: .I =BURNER 660 root cdwriter will make .B MAKEDEV expand .I $BURNER when encountered. .TP .B b mask owner group major minor minor_step dev_number root_name base this directive define some .I block (``b'') device(s) creation. They will be owned by .I owner and .I group and will have the .I major and .I minor as major and minor numbers. .br The .I dev_number arguments define how many devices will be created. If .I dev_number is different from 1, then .I dev_number devices will be created, their minor number being incremented by .I minor_step at each step. .br If only one device is created, it will be named \fIroot_name\fP. Else, the devices will be named with regards to the following rules : .RS 7 .IP \(bu If .I root_name does not contains ``%d'', then ```\fI%d\fP'' is appended to its end. .IP \(bu If .I base is not set, it is initialized to zero. .IP \(bu Then, at each step, the name of the device we have to created is obtained by incrementing .I base and replacing ``%d'' by \fI base\fP. This is equivament to these statements : .NF $base++; $file = sprintf($name, $base); .FI .\" If several devices have to be created and if .RE .TP .B 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 .I character devices (``c'') creation. .TP .B l destination source will make .B makdev symlink .I source on \fIdestination\fP. .\" .TP .\" .B s mask owner group root_name .\" will make .\" .B makdev .\" creating a node like the \fBb\fP and the \fBc\fP directives, but as a regular .\" file with the sticky bit positionned. .SH 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 \fBMAKEDEV\fR's configuration files to reflect your site's settings. .SH EXAMPLES .RS .sp .nf .ne 7 # /etc/makedev.d/test sample # # the following line create (```\fBc\fP'') the famous \fI/dev/null\fP 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 \fI/dev/hdaX\fP 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 .fi .sp .RE .PP .SH NOTES The name of the file may contain some ``\fI/\fP'' characters : .B makdev will create the necessary directories if the node to create must be in a sub directory. .br Comments must begin on first line character. .br Files are parsed one by one, after having been sorted by name in alphabetical order. .SH FILES The .IR /etc/makedev.d/* files contains instructions that instrument .B makdev to create the device files in /dev. Especially, .IR /etc/makedev.d/00macros define most frequently used macros. .SH "SEE ALSO" Linux Allocated Devices .br It can be found in .IR /usr/share/doc/kernel-doc-/Documentation/devices.txt if the kernel-doc package is installed. is the version number of the installed kernel (eg: 2.6.32). .PP .BR MAKEDEV (8) .SH AUTHOR .RI "Thierry Vignaud <" tvignaud@mandrakesoft.com ">, 2002" .br .RI "Hans de Goede <" hdegoede@redhat.com ">, 2010"