]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man5/devfs.conf.5
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man5 / devfs.conf.5
1 .\" Copyright (c) 2004 Roland Smith <rsmith@xs4all.nl>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd May 17, 2005
28 .Dt DEVFS.CONF 5
29 .Os
30 .Sh NAME
31 .Nm devfs.conf
32 .Nd boot-time devfs configuration information
33 .Sh DESCRIPTION
34 The
35 .Nm
36 file provides an easy way to set ownership and permissions, or create
37 links for devices available at boot.
38 .Pp
39 It does not work for devices plugged in and out after the system is up
40 and running, e.g.\& USB devices.
41 See
42 .Xr devfs.rules 5
43 for setting ownership and permissions for all device nodes, and
44 .Xr devd.conf 5
45 for actions to be taken when devices are attached or detached.
46 .Pp
47 Lines starting with a hash sign
48 .Pq Ql #
49 and empty lines are ignored.
50 The lines that specify
51 .Nm
52 rules consist of three parameters separated by whitespace:
53 .Bl -tag -width indent
54 .It Ar action
55 The action to take for the device.
56 The action names are only significant to the first unique character.
57 .It Ar devname
58 The name of the device created by
59 .Xr devfs 5 .
60 .It Ar arg
61 The argument of the
62 .Ar action .
63 .El
64 .Pp
65 The actions currently supported are:
66 .Bl -tag -width indent
67 .It Ic link
68 This action creates a symbolic link named
69 .Ar arg
70 that points to
71 .Ar devname ,
72 the name of the device created by
73 .Xr devfs 5 .
74 .It Ic own
75 This action changes the ownership of
76 .Ar devname .
77 The
78 .Ar arg
79 parameter must be in the form of an
80 .Ar owner Ns : Ns Ar group
81 pair, in the same format used by
82 .Xr chown 8 .
83 .It Ic perm
84 This action changes the permissions of
85 .Ar devname .
86 The
87 .Ar arg
88 parameter must be a
89 .Ar mode
90 as explained in
91 .Xr chmod 1 .
92 .El
93 .Sh FILES
94 .Bl -tag -compact -width Pa
95 .It Pa /etc/devfs.conf
96 .It Pa /usr/share/examples/etc/devfs.conf
97 .El
98 .Sh EXAMPLES
99 To create a
100 .Pa /dev/cdrom
101 link that points to the first
102 .Xr SCSI 4
103 or
104 .Xr atapicam 4
105 CD-ROM,
106 the following may be added to
107 .Nm :
108 .Bd -literal -offset indent
109 link    cd0     cdrom
110 .Ed
111 .Pp
112 Similarly, to link
113 .Pa /dev/cdrom
114 to the first ATAPI CD-ROM device, the following action may be used:
115 .Bd -literal -offset indent
116 link    acd0    cdrom
117 .Ed
118 .Pp
119 To set the owner of a device, the
120 .Ic own
121 action may be specified:
122 .Bd -literal -offset indent
123 own     cd0     root:cdrom
124 .Ed
125 .Pp
126 To set the permissions of a device, a
127 .Ic perm
128 action should be used:
129 .Bd -literal -offset indent
130 perm    cd0     0660
131 .Ed
132 .Sh SEE ALSO
133 .Xr chmod 1 ,
134 .Xr devd.conf 5 ,
135 .Xr devfs 5 ,
136 .Xr devfs.rules 5 ,
137 .Xr chown 8
138 .Sh AUTHORS
139 This manual page was written by
140 .An "Roland Smith" Aq rsmith@xs4all.nl .