Merge branch 'vendor/TEXINFO'
[dragonfly.git] / sbin / mount_devfs / mount_devfs.8
1 .\"
2 .\" Copyright (c) 2009
3 .\"     The DragonFly Project.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in
13 .\"    the documentation and/or other materials provided with the
14 .\"    distribution.
15 .\" 3. Neither the name of The DragonFly Project nor the names of its
16 .\"    contributors may be used to endorse or promote products derived
17 .\"    from this software without specific, prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
23 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .Dd August 17, 2009
33 .Dt MOUNT_DEVFS 8
34 .Os
35 .Sh NAME
36 .Nm mount_devfs
37 .Nd mount a device file system
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl o Ar options
41 .Ar node
42 .Sh DESCRIPTION
43 The
44 .Nm
45 command attaches an instance of the device file system (or
46 .Xr devfs 5 )
47 to the global file system namespace.
48 This command is automatically executed for
49 .Pa /dev
50 at boot time.
51 .Pp
52 The options are as follows:
53 .Bl -tag -width indent
54 .It Fl o
55 Specify mount options, which are a comma delimited set of options (see
56 .Xr mount 8 ) .
57 Supported mount options are:
58 .Bl -tag -width indent
59 .It Ar jail
60 Mount
61 .Xr devfs 5
62 for a jail.
63 Only rules between
64 .Ic jail Ar yes
65 and
66 .Ic jail Ar no
67 are applied.
68 .It Ar ruleset=rule_file
69 When mounting, apply the rules from the specified
70 .Ar rule_file ,
71 which can be either an absolute path or one relative to
72 .Pa /etc/devfs/ .
73 .El
74 .El
75 .Pp
76 Mounting an already mounted
77 .Ar node
78 clears and resets all rules that are in effect for it and (if a
79 .Ar ruleset
80 option is present) applies the rules from
81 .Ar rule_file .
82 It is equal to
83 .Nm devfsctl Fl cr
84 followed by an optional
85 .Nm devfsctl Fl af .
86 .Sh EXAMPLES
87 Mount a
88 .Xr devfs 5 ,
89 marked as
90 .Ar jail ,
91 with a ruleset file named
92 .Pa default.rules
93 onto
94 .Pa /var/jail/dev .
95 .Bd -literal -offset indent
96 mount_devfs -o jail,ruleset=default.rules /var/jail/dev
97 .Ed
98 .Pp
99 A corresponding
100 .Xr fstab 5
101 entry is:
102 .Bd -literal -offset indent
103 devfs /var/jail/dev devfs jail,ruleset=default.rules
104 .Ed
105 .Sh SEE ALSO
106 .Xr mount 2 ,
107 .Xr unmount 2 ,
108 .Xr devfs 5 ,
109 .Xr fstab 5 ,
110 .Xr devfsctl 8 ,
111 .Xr mount 8
112 .Sh HISTORY
113 The
114 .Nm
115 utility first appeared in
116 .Dx 2.3 .