1 .\" Copyright (c) 2002 Thierry Vignaud <tvignaud@mandrakesoft.com>
2 .\" Copyright (c) 2010 Hans de Goede <hdegoede@redhat.com>
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, write to the Free
21 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .TH makedev.d 5 "1 June 2010" "Red Hat Linux" "Linux System Administrator's Manual"
27 makedev.d \- configuration files for devices creation through MAKEDEV
32 is instrumented by the configuration files in
34 directory. They're read and "executed" by
36 on post installation of the MAKEDEV package.
38 These configuration file consists of a set of lines.
40 All empty lines, and all text on a line after a '#', will be ignored.
42 The remaining lines should all conform to one of the following formats:
44 This is a description of the four basic legal directives.
46 .B =NAME expanded text
47 this define a macro. eg:
48 .I =BURNER 660 root cdwriter
55 .B b mask owner group major minor minor_step dev_number root_name base
56 this directive define some
58 (``b'') device(s) creation. They will be owned by
66 as major and minor numbers.
70 arguments define how many devices will be created. If
72 is different from 1, then
74 devices will be created, their minor number being incremented by
78 If only one device is created, it will be named \fIroot_name\fP. Else,
79 the devices will be named with regards to the following rules :
84 does not contains ``%d'', then ```\fI%d\fP'' is appended to its end.
88 is not set, it is initialized to zero.
90 Then, at each step, the name of the device we have to created is obtained
93 and replacing ``%d'' by \fI base\fP. This is equivament to these statements :
95 $base++; $file = sprintf($name, $base);
97 .\" If several devices have to be created and if
100 .B c mask owner group major minor minor_step dev_number root_name base
101 is quite the same directive as the previous one, exept its purpose is
103 devices (``c'') creation.
105 .B l destination source
110 on \fIdestination\fP.
112 .\" .B s mask owner group root_name
115 .\" creating a node like the \fBb\fP and the \fBc\fP directives, but as a regular
116 .\" file with the sticky bit positionned.
118 Since there is currently no standardization in what names are used for
119 system users and groups, it is possible that you may need to modify
120 \fBMAKEDEV\fR's configuration files to reflect your site's settings.
126 # /etc/makedev.d/test sample
129 # the following line create (```\fBc\fP'') the famous \fI/dev/null\fP entry
130 # with 666 mask (file access permissions), with 1 as major and
132 c 666 root root 1 3 1 1 null
135 # the following line define the STORAGE macro that specify a 660
136 # mask for file permissions, root as owner and disk as group
137 =STORAGE 660 root disk
139 # the following line create 16 \fI/dev/hdaX\fP entries (/dev/hda0 to
140 # /dev/hda15) with the permissions and ownership defined above,
141 # and with 22 as major
142 b $STORAGE 22 0 1 16 hda%d
144 # this one link /dev/snd on alsa entry in procfs
145 # (usually mounted in /proc)
146 l snd ../proc/asound/dev
152 The name of the file may contain some ``\fI/\fP'' characters :
154 will create the necessary directories if the node to create must be
157 Comments must begin on first line character.
159 Files are parsed one by one, after having been sorted by name in alphabetical order.
163 files contains instructions that instrument
165 to create the device files in /dev. Especially,
166 .IR /etc/makedev.d/00macros
167 define most frequently used macros.
169 Linux Allocated Devices
172 .IR /usr/share/doc/kernel-doc-<VERSION>/Documentation/devices.txt
173 if the kernel-doc package is installed. <VERSION> is the version number
174 of the installed kernel (eg: 2.6.32).
178 .RI "Thierry Vignaud <" tvignaud@mandrakesoft.com ">, 2002"
180 .RI "Hans de Goede <" hdegoede@redhat.com ">, 2010"