xref: /freebsd/sbin/devfs/devfs.8 (revision 0514f032)
1a1dc2096SDima Dorfman.\"
2a1dc2096SDima Dorfman.\" Copyright (c) 2002 Dima Dorfman.
3a1dc2096SDima Dorfman.\" All rights reserved.
4a1dc2096SDima Dorfman.\"
5a1dc2096SDima Dorfman.\" Redistribution and use in source and binary forms, with or without
6a1dc2096SDima Dorfman.\" modification, are permitted provided that the following conditions
7a1dc2096SDima Dorfman.\" are met:
8a1dc2096SDima Dorfman.\" 1. Redistributions of source code must retain the above copyright
9a1dc2096SDima Dorfman.\"    notice, this list of conditions and the following disclaimer.
10a1dc2096SDima Dorfman.\" 2. Redistributions in binary form must reproduce the above copyright
11a1dc2096SDima Dorfman.\"    notice, this list of conditions and the following disclaimer in the
12a1dc2096SDima Dorfman.\"    documentation and/or other materials provided with the distribution.
13a1dc2096SDima Dorfman.\"
14a1dc2096SDima Dorfman.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15a1dc2096SDima Dorfman.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16a1dc2096SDima Dorfman.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17a1dc2096SDima Dorfman.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18a1dc2096SDima Dorfman.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19a1dc2096SDima Dorfman.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20a1dc2096SDima Dorfman.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21a1dc2096SDima Dorfman.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22a1dc2096SDima Dorfman.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23a1dc2096SDima Dorfman.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24a1dc2096SDima Dorfman.\" SUCH DAMAGE.
25a1dc2096SDima Dorfman.\"
260514f032SJose Luis Duran.Dd October 18, 2023
277ba06023SRuslan Ermilov.Dt DEVFS 8
28a1dc2096SDima Dorfman.Os
29a1dc2096SDima Dorfman.Sh NAME
30a1dc2096SDima Dorfman.Nm devfs
31a1dc2096SDima Dorfman.Nd "DEVFS control"
32a1dc2096SDima Dorfman.Sh SYNOPSIS
33a1dc2096SDima Dorfman.Nm
34a1dc2096SDima Dorfman.Op Fl m Ar mount-point
357ba06023SRuslan Ermilov.Ar keyword
36a1dc2096SDima Dorfman.Ar argument ...
37a1dc2096SDima Dorfman.Sh DESCRIPTION
38a1dc2096SDima DorfmanThe
39a1dc2096SDima Dorfman.Nm
40a1dc2096SDima Dorfmanutility provides an interface to manipulate properties of
41a1dc2096SDima Dorfman.Xr devfs 5
42a1dc2096SDima Dorfmanmounts.
43a1dc2096SDima Dorfman.Pp
444102e838SJohn-Mark GurneyThe rules, by default as configured by
454102e838SJohn-Mark Gurney.Pa /etc/rc.conf ,
464102e838SJohn-Mark Gurneyare loaded at boot via the devfs
474102e838SJohn-Mark Gurney.Xr service 8 .
484102e838SJohn-Mark GurneyThe rules can be reloaded by running the command:
494102e838SJohn-Mark Gurney.Bd -literal -offset indent
504102e838SJohn-Mark Gurneyservice devfs restart
514102e838SJohn-Mark Gurney.Ed
524102e838SJohn-Mark Gurney.Pp
53d54277a7SSimon L. B. NielsenThe
54d54277a7SSimon L. B. Nielsen.Ar keyword
55d54277a7SSimon L. B. Nielsenargument determines the context for
56a1dc2096SDima Dorfmanthe rest of the arguments.
57a1dc2096SDima DorfmanFor example,
58a1dc2096SDima Dorfmanmost of the commands related to the rule subsystem must be preceded by the
59a1dc2096SDima Dorfman.Cm rule
60a1dc2096SDima Dorfmankeyword.
61a1dc2096SDima DorfmanThe following flags are common to all keywords:
6221c2aa5eSJoel Dahl.Bl -tag -width 15n
63a1dc2096SDima Dorfman.It Fl m Ar mount-point
64a1dc2096SDima DorfmanOperate on
65a1dc2096SDima Dorfman.Ar mount-point ,
66a1dc2096SDima Dorfmanwhich is expected to be a
67a1dc2096SDima Dorfman.Xr devfs 5
68a1dc2096SDima Dorfmanmount.
69a1dc2096SDima DorfmanIf this option is not specified,
70a1dc2096SDima Dorfman.Nm
71a1dc2096SDima Dorfmanoperates on
72a1dc2096SDima Dorfman.Pa /dev .
73a1dc2096SDima Dorfman.El
74014c2ea5SDima Dorfman.Ss Rule Subsystem
75a1dc2096SDima DorfmanThe
76a1dc2096SDima Dorfman.Xr devfs 5
77a1dc2096SDima Dorfmanrule subsystem provides a way for the administrator of a system to control
78a1dc2096SDima Dorfmanthe attributes of DEVFS nodes.
79a1dc2096SDima Dorfman.\" XXX devfs node?  entry?  what?
80a1dc2096SDima DorfmanEach DEVFS mount-point has a
81a1dc2096SDima Dorfman.Dq ruleset ,
82a1dc2096SDima Dorfmanor a list of rules,
83a1dc2096SDima Dorfmanassociated with it.
84a1dc2096SDima DorfmanWhen a device driver creates a new node,
85a1dc2096SDima Dorfmanall the rules in the ruleset associated with each mount-point are applied
86a1dc2096SDima Dorfman(see below) before the node becomes visible to the userland.
87a1dc2096SDima DorfmanThis permits the administrator to change the properties,
88a1dc2096SDima Dorfmanincluding the visibility,
89a1dc2096SDima Dorfmanof certain nodes.
90a1dc2096SDima DorfmanFor example, one might want to hide all disk nodes in a
91a1dc2096SDima Dorfman.Xr jail 2 Ns 's
92a1dc2096SDima Dorfman.Pa /dev .
93a1dc2096SDima Dorfman.Ss Rule Manipulation
94a1dc2096SDima DorfmanRule manipulation commands follow the
95a1dc2096SDima Dorfman.Cm rule
96a1dc2096SDima Dorfmankeyword.
97a1dc2096SDima DorfmanThe following flags are common to all of the rule manipulation commands:
9821c2aa5eSJoel Dahl.Bl -tag -width 15n
99a1dc2096SDima Dorfman.It Fl s Ar ruleset
100a1dc2096SDima DorfmanOperate on the ruleset with the number
101a1dc2096SDima Dorfman.Ar ruleset .
102a1dc2096SDima DorfmanIf this is not specified,
103a1dc2096SDima Dorfmanthe commands operate on the ruleset currently associated with the
104a1dc2096SDima Dorfmanspecified mount-point.
105a1dc2096SDima Dorfman.El
106a1dc2096SDima Dorfman.Pp
107a1dc2096SDima DorfmanThe following commands are recognized:
10821c2aa5eSJoel Dahl.Bl -tag -width 15n
109a1dc2096SDima Dorfman.It Cm rule add Oo Ar rulenum Oc Ar rulespec
110a1dc2096SDima DorfmanAdd the rule described by
111a1dc2096SDima Dorfman.Ar rulespec
112a1dc2096SDima Dorfman(defined below)
113a1dc2096SDima Dorfmanto the ruleset.
114a1dc2096SDima DorfmanThe rule has the number
115a1dc2096SDima Dorfman.Ar rulenum
116a1dc2096SDima Dorfmanif it is explicitly specified;
117a1dc2096SDima Dorfmanotherwise, the rule number is automatically determined by the kernel.
1187ba06023SRuslan Ermilov.It Cm rule apply Ar rulenum | rulespec
119a1dc2096SDima DorfmanApply rule number
120a1dc2096SDima Dorfman.Ar rulenum
121a1dc2096SDima Dorfmanor the rule described by
122a1dc2096SDima Dorfman.Ar rulespec
123a1dc2096SDima Dorfmanto the mount-point.
1247ba06023SRuslan ErmilovRules that are
1257ba06023SRuslan Ermilov.Dq applied
1267ba06023SRuslan Ermilovhave their conditions checked against all nodes
127111c3747SDima Dorfmanin the mount-point and the actions taken if they match.
128a1dc2096SDima Dorfman.It Cm rule applyset
129a1dc2096SDima DorfmanApply all the rules in the ruleset to the mount-point
1307ba06023SRuslan Ermilov(see above for the definition of
1317ba06023SRuslan Ermilov.Dq apply ) .
132a1dc2096SDima Dorfman.It Cm rule del Ar rulenum
133a1dc2096SDima DorfmanDelete rule number
134a1dc2096SDima Dorfman.Ar rulenum
135a1dc2096SDima Dorfmanfrom the ruleset.
136a1dc2096SDima Dorfman.It Cm rule delset
137a1dc2096SDima DorfmanDelete all rules from the ruleset.
138a1dc2096SDima Dorfman.It Cm rule show Op Ar rulenum
139a1dc2096SDima DorfmanDisplay the rule number
140a1dc2096SDima Dorfman.Ar rulenum ,
141a1dc2096SDima Dorfmanor all the rules in the ruleset.
142a1dc2096SDima DorfmanThe output lines (one line per rule) are expected to be valid
143a1dc2096SDima Dorfman.Ar rulespec Ns s .
144a1dc2096SDima Dorfman.It Cm rule showsets
145a1dc2096SDima DorfmanReport the numbers of existing rulesets.
146a1dc2096SDima Dorfman.It Cm ruleset Ar ruleset
147a1dc2096SDima DorfmanSet ruleset number
148a1dc2096SDima Dorfman.Ar ruleset
149a1dc2096SDima Dorfmanas the current ruleset for the mount-point.
150a1dc2096SDima Dorfman.El
151a1dc2096SDima Dorfman.Ss Rule Specification
152a1dc2096SDima DorfmanRules have two parts: the conditions and the actions.
153111c3747SDima DorfmanThe conditions determine which DEVFS nodes the rule matches
154a1dc2096SDima Dorfmanand the actions determine what should be done when a rule matches a node.
155a1dc2096SDima DorfmanFor example, a rule can be written that sets the GID to
1561964f79aSPoul-Henning Kamp.Dq Li operator
1571964f79aSPoul-Henning Kampfor all devices of type tape.
158072af151SDima DorfmanIf the first token of a rule specification is a single dash
1597ba06023SRuslan Ermilov.Pq Sq Fl ,
160072af151SDima Dorfmanrules are read from the standard input and the rest of the specification
161072af151SDima Dorfmanis ignored.
162a1dc2096SDima Dorfman.Pp
163a1dc2096SDima DorfmanThe following conditions are recognized.
164a1dc2096SDima DorfmanConditions are ANDed together when matching a device;
165a1dc2096SDima Dorfmanif OR is desired, multiple rules can be written.
16621c2aa5eSJoel Dahl.Bl -tag -width 15n
167a1dc2096SDima Dorfman.It Cm path Ar pattern
168a1dc2096SDima DorfmanMatches any node with a path that matches
169111c3747SDima Dorfman.Ar pattern ,
170111c3747SDima Dorfmanwhich is interpreted as a
171a1dc2096SDima Dorfman.Xr glob 3 Ns -style
172a1dc2096SDima Dorfmanpattern.
173a1dc2096SDima Dorfman.It Cm type Ar devtype
174a1dc2096SDima DorfmanMatches any node that is of type
175a1dc2096SDima Dorfman.Ar devtype .
176a1dc2096SDima DorfmanValid types are
1777ba06023SRuslan Ermilov.Cm disk , mem , tape
178a1dc2096SDima Dorfmanand
1797ba06023SRuslan Ermilov.Cm tty .
180a1dc2096SDima Dorfman.El
181a1dc2096SDima Dorfman.Pp
182a1dc2096SDima DorfmanThe following actions are recognized.
183a1dc2096SDima DorfmanAlthough there is no explicit delimiter between conditions and actions,
184a1dc2096SDima Dorfmanthey may not be intermixed.
18521c2aa5eSJoel Dahl.Bl -tag -width 15n
186a1dc2096SDima Dorfman.It Cm group Ar gid
187a1dc2096SDima DorfmanSet the GID of the node to
188a1dc2096SDima Dorfman.Ar gid ,
189a1dc2096SDima Dorfmanwhich may be a group name
190a1dc2096SDima Dorfman(looked up in
191a1dc2096SDima Dorfman.Pa /etc/group )
192a1dc2096SDima Dorfmanor number.
193a1dc2096SDima Dorfman.It Cm hide
194a1dc2096SDima DorfmanHide the node.
195a1dc2096SDima DorfmanNodes may later be revived manually with
196111c3747SDima Dorfman.Xr mknod 8
197a1dc2096SDima Dorfmanor with the
198a1dc2096SDima Dorfman.Cm unhide
199a1dc2096SDima Dorfmanaction.
20036ad3f47SJaakko HeinonenHiding a directory node effectively hides all of its child nodes.
201a1dc2096SDima Dorfman.It Cm include Ar ruleset
202a1dc2096SDima DorfmanApply all the rules in ruleset number
203a1dc2096SDima Dorfman.Ar ruleset
204a1dc2096SDima Dorfmanto the node.
205a1dc2096SDima DorfmanThis does not necessarily result in any changes to the node
206a1dc2096SDima Dorfman(e.g., if none of the rules in the included ruleset match).
207ebae8e93SGavin AtkinsonInclude commands in the referenced
208ebae8e93SGavin Atkinson.Ar ruleset
209ebae8e93SGavin Atkinsonare not resolved.
210a1dc2096SDima Dorfman.It Cm mode Ar filemode
211a1dc2096SDima DorfmanSet the file mode to
212a1dc2096SDima Dorfman.Ar filemode ,
2131cf7cec3SDima Dorfmanwhich is interpreted as in
2141cf7cec3SDima Dorfman.Xr chmod 1 .
215a1dc2096SDima Dorfman.It Cm user Ar uid
216a1dc2096SDima DorfmanSet the UID to
217a1dc2096SDima Dorfman.Ar uid ,
218a1dc2096SDima Dorfmanwhich may be a user name
219a1dc2096SDima Dorfman(looked up in
220a1dc2096SDima Dorfman.Pa /etc/passwd )
221a1dc2096SDima Dorfmanor number.
222a1dc2096SDima Dorfman.It Cm unhide
223a1dc2096SDima DorfmanUnhide the node.
22436ad3f47SJaakko HeinonenIf the node resides in a subdirectory,
22536ad3f47SJaakko Heinonenall parent directory nodes must be visible to be able to access the node.
226a1dc2096SDima Dorfman.El
227014c2ea5SDima Dorfman.Sh IMPLEMENTATION NOTES
228111c3747SDima DorfmanRulesets are created by the kernel at the first reference
229a1dc2096SDima Dorfmanand destroyed when the last reference disappears.
230a1dc2096SDima DorfmanE.g., a ruleset is created when a rule is added to it or when it is set
231111c3747SDima Dorfmanas the current ruleset for a mount-point, and
232111c3747SDima Dorfmana ruleset is destroyed when the last rule in it is deleted
233a1dc2096SDima Dorfmanand no other references to it exist
234111c3747SDima Dorfman(i.e., it is not included by any rules and it is not the current ruleset
235a1dc2096SDima Dorfmanfor any mount-point).
236014c2ea5SDima Dorfman.Pp
237a1dc2096SDima DorfmanRuleset number 0 is the default ruleset for all new mount-points.
238a1dc2096SDima DorfmanIt is always empty, cannot be modified or deleted, and does not show up
239a1dc2096SDima Dorfmanin the output of
240a1dc2096SDima Dorfman.Cm showsets .
241014c2ea5SDima Dorfman.Pp
242a1dc2096SDima DorfmanRules and rulesets are unique to the entire system,
243a1dc2096SDima Dorfmannot a particular mount-point.
244a1dc2096SDima DorfmanI.e., a
245a1dc2096SDima Dorfman.Cm showsets
246a1dc2096SDima Dorfmanwill return the same information regardless of the mount-point specified with
247a1dc2096SDima Dorfman.Fl m .
248111c3747SDima DorfmanThe mount-point is only relevant when changing what its current ruleset is
249a1dc2096SDima Dorfmanor when using one of the apply commands.
25055c82bf0SRuslan Ermilov.Sh FILES
2510514f032SJose Luis Duran.Bl -tag -width "Pa /etc/defaults/devfs.rules" -compact
25255c82bf0SRuslan Ermilov.It Pa /etc/defaults/devfs.rules
25322425699SDaniel GerzoDefault
25422425699SDaniel Gerzo.Nm
25522425699SDaniel Gerzoconfiguration file.
25655c82bf0SRuslan Ermilov.It Pa /etc/devfs.rules
25722425699SDaniel GerzoLocal
25822425699SDaniel Gerzo.Nm
259e441cce6SSevan Janiyanconfiguration file.
260e441cce6SSevan JaniyanRulesets in here override those in
261ebae8e93SGavin Atkinson.Pa /etc/defaults/devfs.rules
262ebae8e93SGavin Atkinsonwith the same ruleset number, otherwise the two files are effectively merged.
26322425699SDaniel Gerzo.It Pa /etc/devfs.conf
26422425699SDaniel GerzoBoot-time
26522425699SDaniel Gerzo.Nm
26622425699SDaniel Gerzoconfiguration file.
26755c82bf0SRuslan Ermilov.El
268014c2ea5SDima Dorfman.Sh EXAMPLES
269a1dc2096SDima DorfmanWhen the system boots,
270a1dc2096SDima Dorfmanthe only ruleset that exists is ruleset number 0;
271a1dc2096SDima Dorfmansince the latter may not be modified, we have to create another ruleset
272a1dc2096SDima Dorfmanbefore adding rules.
2737ba06023SRuslan ErmilovNote that since most of the following examples do not specify
274a1dc2096SDima Dorfman.Fl m ,
275a1dc2096SDima Dorfmanthe operations are performed on
276a1dc2096SDima Dorfman.Pa /dev
277a1dc2096SDima Dorfman(this only matters for things that might change the properties of nodes).
278a1dc2096SDima Dorfman.Pp
279a1dc2096SDima DorfmanSpecify that ruleset 10 should be the current ruleset for
280a1dc2096SDima Dorfman.Pa /dev
281309bbfe8SJoel Dahl(if it does not already exist, it is created):
282a1dc2096SDima Dorfman.Pp
283309bbfe8SJoel Dahl.Dl "devfs ruleset 10"
284a1dc2096SDima Dorfman.Pp
285a1dc2096SDima DorfmanAdd a rule that causes all nodes that have a path that matches
2867ba06023SRuslan Ermilov.Dq Li speaker
287a1dc2096SDima Dorfman(this is only
288a1dc2096SDima Dorfman.Pa /dev/speaker )
289a1dc2096SDima Dorfmanto have the file mode 666 (read and write for all).
290a1dc2096SDima DorfmanNote that if any such nodes already exist, their mode will not be changed
291a1dc2096SDima Dorfmanunless this rule (or ruleset) is explicitly applied (see below).
292a1dc2096SDima DorfmanThe mode
293a1dc2096SDima Dorfman.Em will
294a1dc2096SDima Dorfmanbe changed if the node is created
295a1dc2096SDima Dorfman.Em after
296a1dc2096SDima Dorfmanthe rule is added
297a1dc2096SDima Dorfman(e.g., the
298a1dc2096SDima Dorfman.Pa atspeaker
299309bbfe8SJoel Dahlmodule is loaded after the above rule is added):
300a1dc2096SDima Dorfman.Pp
301309bbfe8SJoel Dahl.Dl "devfs rule add path speaker mode 666"
302a1dc2096SDima Dorfman.Pp
303a1dc2096SDima DorfmanApply all the rules in the current ruleset to all the existing nodes.
304309bbfe8SJoel DahlE.g., if the below rule was added after
305a1dc2096SDima Dorfman.Pa /dev/speaker
306a1dc2096SDima Dorfmanwas created,
307111c3747SDima Dorfmanthis command will cause its file mode to be changed to 666
308309bbfe8SJoel Dahlas prescribed by the rule:
309a1dc2096SDima Dorfman.Pp
310309bbfe8SJoel Dahl.Dl "devfs rule applyset"
311a1dc2096SDima Dorfman.Pp
3127ba06023SRuslan ErmilovFor all devices with a path that matches
3137ba06023SRuslan Ermilov.Dq Li snp* ,
31455f77691SPoul-Henning Kampset the file mode to 660 and the GID to
3157ba06023SRuslan Ermilov.Dq Li snoopers .
316a1dc2096SDima DorfmanThis permits users in the
3177ba06023SRuslan Ermilov.Dq Li snoopers
318a1dc2096SDima Dorfmangroup to use the
319a1dc2096SDima Dorfman.Xr snp 4
320309bbfe8SJoel Dahldevices
321309bbfe8SJoel Dahl(quoting the argument to
322309bbfe8SJoel Dahl.Cm path
323309bbfe8SJoel Dahlis often necessary to disable the shell's globbing features):
324a1dc2096SDima Dorfman.Pp
325309bbfe8SJoel Dahl.Dl devfs rule add path "snp*" mode 660 group snoopers
326a1dc2096SDima Dorfman.Pp
327a1dc2096SDima DorfmanAdd a rule to ruleset number 20.
328a1dc2096SDima DorfmanSince this ruleset is not the current ruleset for any mount-points,
329a1dc2096SDima Dorfmanthis rule is never applied automatically (unless ruleset 20 becomes
330309bbfe8SJoel Dahla current ruleset for some mount-point at a later time):
331309bbfe8SJoel Dahl.Pp
332309bbfe8SJoel Dahl.Dl "devfs rule -s 20 add type disk group wheel"
333309bbfe8SJoel Dahl.Pp
334309bbfe8SJoel DahlExplicitly apply all rules in ruleset number 20 to the DEVFS mount on
335309bbfe8SJoel Dahl.Pa /my/jail/dev .
336309bbfe8SJoel DahlIt does not matter that ruleset 20 is not the current ruleset for that
337309bbfe8SJoel Dahlmount-point; the rules are still applied:
338a1dc2096SDima Dorfman.Pp
3397ba06023SRuslan Ermilov.Dl "devfs -m /my/jail/dev rule -s 20 applyset"
340a1dc2096SDima Dorfman.Pp
341309bbfe8SJoel DahlSince the following rule has no conditions, the action
342309bbfe8SJoel Dahl.Pq Cm hide
343309bbfe8SJoel Dahlwill be applied to all nodes:
344a1dc2096SDima Dorfman.Pp
3457ba06023SRuslan Ermilov.Dl "devfs rule apply hide"
346a1dc2096SDima Dorfman.Pp
347309bbfe8SJoel DahlSince hiding all nodes is not very useful, we can undo it.
348309bbfe8SJoel DahlThe following applies
349309bbfe8SJoel Dahl.Cm unhide
350309bbfe8SJoel Dahlto all the nodes,
351309bbfe8SJoel Dahlcausing them to reappear:
352a1dc2096SDima Dorfman.Pp
3537ba06023SRuslan Ermilov.Dl "devfs rule apply unhide"
354072af151SDima Dorfman.Pp
355309bbfe8SJoel DahlAdd all the rules from the file
356309bbfe8SJoel Dahl.Pa my_rules
357309bbfe8SJoel Dahlto ruleset 10:
358072af151SDima Dorfman.Pp
359111c3747SDima Dorfman.Dl "devfs rule -s 10 add - < my_rules"
360072af151SDima Dorfman.Pp
361309bbfe8SJoel DahlThe below copies all the rules from ruleset 20 into ruleset 10.
362072af151SDima DorfmanThe rule numbers are preserved,
363072af151SDima Dorfmanbut ruleset 10 may already have rules with non-conflicting numbers
364072af151SDima Dorfman(these will be preserved).
365309bbfe8SJoel DahlSince
366309bbfe8SJoel Dahl.Cm show
367309bbfe8SJoel Dahloutputs valid rules,
368309bbfe8SJoel Dahlthis feature can be used to copy rulesets:
369309bbfe8SJoel Dahl.Pp
370309bbfe8SJoel Dahl.Dl "devfs rule -s 20 show | devfs rule -s 10 add -"
371a1dc2096SDima Dorfman.Sh SEE ALSO
372d54277a7SSimon L. B. Nielsen.Xr chmod 1 ,
373a1dc2096SDima Dorfman.Xr jail 2 ,
374a1dc2096SDima Dorfman.Xr glob 3 ,
375a1dc2096SDima Dorfman.Xr devfs 5 ,
37622425699SDaniel Gerzo.Xr devfs.conf 5 ,
37722425699SDaniel Gerzo.Xr devfs.rules 5 ,
378a1dc2096SDima Dorfman.Xr chown 8 ,
379a1dc2096SDima Dorfman.Xr jail 8 ,
3804102e838SJohn-Mark Gurney.Xr mknod 8 ,
3814102e838SJohn-Mark Gurney.Xr service 8
382e441cce6SSevan Janiyan.Sh HISTORY
383e441cce6SSevan JaniyanThe
384e441cce6SSevan Janiyan.Nm
385e441cce6SSevan Janiyanutility first appeared in
386e441cce6SSevan Janiyan.Fx 5.0 .
387a1dc2096SDima Dorfman.Sh AUTHORS
388a1dc2096SDima Dorfman.An Dima Dorfman
389