]> git.ipfire.org Git - ipfire-3.x.git/blame - MAKEDEV/makedev.d.5
clamav: Update to 0.101.4
[ipfire-3.x.git] / MAKEDEV / makedev.d.5
CommitLineData
cde94f92
MT
1.\" Copyright (c) 2002 Thierry Vignaud <tvignaud@mandrakesoft.com>
2.\" Copyright (c) 2010 Hans de Goede <hdegoede@redhat.com>
3.\"
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.
8.\"
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.
13.\"
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.
18.\"
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,
22.\" USA.
23.\"
24.\"
25.TH makedev.d 5 "1 June 2010" "Red Hat Linux" "Linux System Administrator's Manual"
26.SH NAME
27makedev.d \- configuration files for devices creation through MAKEDEV
28.\".SH SYNOPSIS
29.SH DESCRIPTION
30The behavior of
31.B MAKEDEV
32is instrumented by the configuration files in
33.I /etc/makedev.d/
34directory. They're read and "executed" by
35.BR MAKEDEV(8)
36on post installation of the MAKEDEV package.
37.PP
38These configuration file consists of a set of lines.
39.PP
40All empty lines, and all text on a line after a '#', will be ignored.
41.PP
42The remaining lines should all conform to one of the following formats:
43.SH SYNTAX
44This is a description of the four basic legal directives.
45.TP
46.B =NAME expanded text
47this define a macro. eg:
48.I =BURNER 660 root cdwriter
49will make
50.B MAKEDEV
51expand
52.I $BURNER
53when encountered.
54.TP
55.B b mask owner group major minor minor_step dev_number root_name base
56this directive define some
57.I block
58(``b'') device(s) creation. They will be owned by
59.I owner
60and
61.I group
62and will have the
63.I major
64and
65.I minor
66as major and minor numbers.
67.br
68The
69.I dev_number
70arguments define how many devices will be created. If
71.I dev_number
72is different from 1, then
73.I dev_number
74devices will be created, their minor number being incremented by
75.I minor_step
76at each step.
77.br
78If only one device is created, it will be named \fIroot_name\fP. Else,
79the devices will be named with regards to the following rules :
80.RS 7
81.IP \(bu
82If
83.I root_name
84does not contains ``%d'', then ```\fI%d\fP'' is appended to its end.
85.IP \(bu
86If
87.I base
88is not set, it is initialized to zero.
89.IP \(bu
90Then, at each step, the name of the device we have to created is obtained
91by incrementing
92.I base
93and replacing ``%d'' by \fI base\fP. This is equivament to these statements :
94.NF
95$base++; $file = sprintf($name, $base);
96.FI
97.\" If several devices have to be created and if
98.RE
99.TP
100.B c mask owner group major minor minor_step dev_number root_name base
101is quite the same directive as the previous one, exept its purpose is
102.I character
103devices (``c'') creation.
104.TP
105.B l destination source
106will make
107.B makdev
108symlink
109.I source
110on \fIdestination\fP.
111.\" .TP
112.\" .B s mask owner group root_name
113.\" will make
114.\" .B makdev
115.\" creating a node like the \fBb\fP and the \fBc\fP directives, but as a regular
116.\" file with the sticky bit positionned.
117.SH CUSTOMIZATION
118Since there is currently no standardization in what names are used for
119system users and groups, it is possible that you may need to modify
120\fBMAKEDEV\fR's configuration files to reflect your site's settings.
121.SH EXAMPLES
122.RS
123.sp
124.nf
125.ne 7
126# /etc/makedev.d/test sample
127#
128
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
131# 3 as minor
132c 666 root root 1 3 1 1 null
133
134
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
138
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
142b $STORAGE 22 0 1 16 hda%d
143
144# this one link /dev/snd on alsa entry in procfs
145# (usually mounted in /proc)
146l snd ../proc/asound/dev
147.fi
148.sp
149.RE
150.PP
151.SH NOTES
152The name of the file may contain some ``\fI/\fP'' characters :
153.B makdev
154will create the necessary directories if the node to create must be
155in a sub directory.
156.br
157Comments must begin on first line character.
158.br
159Files are parsed one by one, after having been sorted by name in alphabetical order.
160.SH FILES
161The
162.IR /etc/makedev.d/*
163files contains instructions that instrument
164.B makdev
165to create the device files in /dev. Especially,
166.IR /etc/makedev.d/00macros
167define most frequently used macros.
168.SH "SEE ALSO"
169Linux Allocated Devices
170.br
171It can be found in
172.IR /usr/share/doc/kernel-doc-<VERSION>/Documentation/devices.txt
173if the kernel-doc package is installed. <VERSION> is the version number
174of the installed kernel (eg: 2.6.32).
175.PP
176.BR MAKEDEV (8)
177.SH AUTHOR
178.RI "Thierry Vignaud <" tvignaud@mandrakesoft.com ">, 2002"
179.br
180.RI "Hans de Goede <" hdegoede@redhat.com ">, 2010"