]>
Commit | Line | Data |
---|---|---|
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 | |
27 | makedev.d \- configuration files for devices creation through MAKEDEV | |
28 | .\".SH SYNOPSIS | |
29 | .SH DESCRIPTION | |
30 | The behavior of | |
31 | .B MAKEDEV | |
32 | is instrumented by the configuration files in | |
33 | .I /etc/makedev.d/ | |
34 | directory. They're read and "executed" by | |
35 | .BR MAKEDEV(8) | |
36 | on post installation of the MAKEDEV package. | |
37 | .PP | |
38 | These configuration file consists of a set of lines. | |
39 | .PP | |
40 | All empty lines, and all text on a line after a '#', will be ignored. | |
41 | .PP | |
42 | The remaining lines should all conform to one of the following formats: | |
43 | .SH SYNTAX | |
44 | This is a description of the four basic legal directives. | |
45 | .TP | |
46 | .B =NAME expanded text | |
47 | this define a macro. eg: | |
48 | .I =BURNER 660 root cdwriter | |
49 | will make | |
50 | .B MAKEDEV | |
51 | expand | |
52 | .I $BURNER | |
53 | when encountered. | |
54 | .TP | |
55 | .B b mask owner group major minor minor_step dev_number root_name base | |
56 | this directive define some | |
57 | .I block | |
58 | (``b'') device(s) creation. They will be owned by | |
59 | .I owner | |
60 | and | |
61 | .I group | |
62 | and will have the | |
63 | .I major | |
64 | and | |
65 | .I minor | |
66 | as major and minor numbers. | |
67 | .br | |
68 | The | |
69 | .I dev_number | |
70 | arguments define how many devices will be created. If | |
71 | .I dev_number | |
72 | is different from 1, then | |
73 | .I dev_number | |
74 | devices will be created, their minor number being incremented by | |
75 | .I minor_step | |
76 | at each step. | |
77 | .br | |
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 : | |
80 | .RS 7 | |
81 | .IP \(bu | |
82 | If | |
83 | .I root_name | |
84 | does not contains ``%d'', then ```\fI%d\fP'' is appended to its end. | |
85 | .IP \(bu | |
86 | If | |
87 | .I base | |
88 | is not set, it is initialized to zero. | |
89 | .IP \(bu | |
90 | Then, at each step, the name of the device we have to created is obtained | |
91 | by incrementing | |
92 | .I base | |
93 | and 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 | |
101 | is quite the same directive as the previous one, exept its purpose is | |
102 | .I character | |
103 | devices (``c'') creation. | |
104 | .TP | |
105 | .B l destination source | |
106 | will make | |
107 | .B makdev | |
108 | symlink | |
109 | .I source | |
110 | on \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 | |
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. | |
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 | |
132 | c 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 | |
142 | b $STORAGE 22 0 1 16 hda%d | |
143 | ||
144 | # this one link /dev/snd on alsa entry in procfs | |
145 | # (usually mounted in /proc) | |
146 | l snd ../proc/asound/dev | |
147 | .fi | |
148 | .sp | |
149 | .RE | |
150 | .PP | |
151 | .SH NOTES | |
152 | The name of the file may contain some ``\fI/\fP'' characters : | |
153 | .B makdev | |
154 | will create the necessary directories if the node to create must be | |
155 | in a sub directory. | |
156 | .br | |
157 | Comments must begin on first line character. | |
158 | .br | |
159 | Files are parsed one by one, after having been sorted by name in alphabetical order. | |
160 | .SH FILES | |
161 | The | |
162 | .IR /etc/makedev.d/* | |
163 | files contains instructions that instrument | |
164 | .B makdev | |
165 | to create the device files in /dev. Especially, | |
166 | .IR /etc/makedev.d/00macros | |
167 | define most frequently used macros. | |
168 | .SH "SEE ALSO" | |
169 | Linux Allocated Devices | |
170 | .br | |
171 | It can be found in | |
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). | |
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" |