xref: /freebsd/sbin/devfs/devfs.8 (revision e441cce6)
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.\"
26a1dc2096SDima Dorfman.\" $FreeBSD$
27a1dc2096SDima Dorfman.\"
28*e441cce6SSevan Janiyan.Dd October 5, 2016
297ba06023SRuslan Ermilov.Dt DEVFS 8
30a1dc2096SDima Dorfman.Os
31a1dc2096SDima Dorfman.Sh NAME
32a1dc2096SDima Dorfman.Nm devfs
33a1dc2096SDima Dorfman.Nd "DEVFS control"
34a1dc2096SDima Dorfman.Sh SYNOPSIS
35a1dc2096SDima Dorfman.Nm
36a1dc2096SDima Dorfman.Op Fl m Ar mount-point
377ba06023SRuslan Ermilov.Ar keyword
38a1dc2096SDima Dorfman.Ar argument ...
39a1dc2096SDima Dorfman.Sh DESCRIPTION
40a1dc2096SDima DorfmanThe
41a1dc2096SDima Dorfman.Nm
42a1dc2096SDima Dorfmanutility provides an interface to manipulate properties of
43a1dc2096SDima Dorfman.Xr devfs 5
44a1dc2096SDima Dorfmanmounts.
45a1dc2096SDima Dorfman.Pp
46d54277a7SSimon L. B. NielsenThe
47d54277a7SSimon L. B. Nielsen.Ar keyword
48d54277a7SSimon L. B. Nielsenargument determines the context for
49a1dc2096SDima Dorfmanthe rest of the arguments.
50a1dc2096SDima DorfmanFor example,
51a1dc2096SDima Dorfmanmost of the commands related to the rule subsystem must be preceded by the
52a1dc2096SDima Dorfman.Cm rule
53a1dc2096SDima Dorfmankeyword.
54a1dc2096SDima DorfmanThe following flags are common to all keywords:
5521c2aa5eSJoel Dahl.Bl -tag -width 15n
56a1dc2096SDima Dorfman.It Fl m Ar mount-point
57a1dc2096SDima DorfmanOperate on
58a1dc2096SDima Dorfman.Ar mount-point ,
59a1dc2096SDima Dorfmanwhich is expected to be a
60a1dc2096SDima Dorfman.Xr devfs 5
61a1dc2096SDima Dorfmanmount.
62a1dc2096SDima DorfmanIf this option is not specified,
63a1dc2096SDima Dorfman.Nm
64a1dc2096SDima Dorfmanoperates on
65a1dc2096SDima Dorfman.Pa /dev .
66a1dc2096SDima Dorfman.El
67014c2ea5SDima Dorfman.Ss Rule Subsystem
68a1dc2096SDima DorfmanThe
69a1dc2096SDima Dorfman.Xr devfs 5
70a1dc2096SDima Dorfmanrule subsystem provides a way for the administrator of a system to control
71a1dc2096SDima Dorfmanthe attributes of DEVFS nodes.
72a1dc2096SDima Dorfman.\" XXX devfs node?  entry?  what?
73a1dc2096SDima DorfmanEach DEVFS mount-point has a
74a1dc2096SDima Dorfman.Dq ruleset ,
75a1dc2096SDima Dorfmanor a list of rules,
76a1dc2096SDima Dorfmanassociated with it.
77a1dc2096SDima DorfmanWhen a device driver creates a new node,
78a1dc2096SDima Dorfmanall the rules in the ruleset associated with each mount-point are applied
79a1dc2096SDima Dorfman(see below) before the node becomes visible to the userland.
80a1dc2096SDima DorfmanThis permits the administrator to change the properties,
81a1dc2096SDima Dorfmanincluding the visibility,
82a1dc2096SDima Dorfmanof certain nodes.
83a1dc2096SDima DorfmanFor example, one might want to hide all disk nodes in a
84a1dc2096SDima Dorfman.Xr jail 2 Ns 's
85a1dc2096SDima Dorfman.Pa /dev .
86a1dc2096SDima Dorfman.Ss Rule Manipulation
87a1dc2096SDima DorfmanRule manipulation commands follow the
88a1dc2096SDima Dorfman.Cm rule
89a1dc2096SDima Dorfmankeyword.
90a1dc2096SDima DorfmanThe following flags are common to all of the rule manipulation commands:
9121c2aa5eSJoel Dahl.Bl -tag -width 15n
92a1dc2096SDima Dorfman.It Fl s Ar ruleset
93a1dc2096SDima DorfmanOperate on the ruleset with the number
94a1dc2096SDima Dorfman.Ar ruleset .
95a1dc2096SDima DorfmanIf this is not specified,
96a1dc2096SDima Dorfmanthe commands operate on the ruleset currently associated with the
97a1dc2096SDima Dorfmanspecified mount-point.
98a1dc2096SDima Dorfman.El
99a1dc2096SDima Dorfman.Pp
100a1dc2096SDima DorfmanThe following commands are recognized:
10121c2aa5eSJoel Dahl.Bl -tag -width 15n
102a1dc2096SDima Dorfman.It Cm rule add Oo Ar rulenum Oc Ar rulespec
103a1dc2096SDima DorfmanAdd the rule described by
104a1dc2096SDima Dorfman.Ar rulespec
105a1dc2096SDima Dorfman(defined below)
106a1dc2096SDima Dorfmanto the ruleset.
107a1dc2096SDima DorfmanThe rule has the number
108a1dc2096SDima Dorfman.Ar rulenum
109a1dc2096SDima Dorfmanif it is explicitly specified;
110a1dc2096SDima Dorfmanotherwise, the rule number is automatically determined by the kernel.
1117ba06023SRuslan Ermilov.It Cm rule apply Ar rulenum | rulespec
112a1dc2096SDima DorfmanApply rule number
113a1dc2096SDima Dorfman.Ar rulenum
114a1dc2096SDima Dorfmanor the rule described by
115a1dc2096SDima Dorfman.Ar rulespec
116a1dc2096SDima Dorfmanto the mount-point.
1177ba06023SRuslan ErmilovRules that are
1187ba06023SRuslan Ermilov.Dq applied
1197ba06023SRuslan Ermilovhave their conditions checked against all nodes
120111c3747SDima Dorfmanin the mount-point and the actions taken if they match.
121a1dc2096SDima Dorfman.It Cm rule applyset
122a1dc2096SDima DorfmanApply all the rules in the ruleset to the mount-point
1237ba06023SRuslan Ermilov(see above for the definition of
1247ba06023SRuslan Ermilov.Dq apply ) .
125a1dc2096SDima Dorfman.It Cm rule del Ar rulenum
126a1dc2096SDima DorfmanDelete rule number
127a1dc2096SDima Dorfman.Ar rulenum
128a1dc2096SDima Dorfmanfrom the ruleset.
129a1dc2096SDima Dorfman.It Cm rule delset
130a1dc2096SDima DorfmanDelete all rules from the ruleset.
131a1dc2096SDima Dorfman.It Cm rule show Op Ar rulenum
132a1dc2096SDima DorfmanDisplay the rule number
133a1dc2096SDima Dorfman.Ar rulenum ,
134a1dc2096SDima Dorfmanor all the rules in the ruleset.
135a1dc2096SDima DorfmanThe output lines (one line per rule) are expected to be valid
136a1dc2096SDima Dorfman.Ar rulespec Ns s .
137a1dc2096SDima Dorfman.It Cm rule showsets
138a1dc2096SDima DorfmanReport the numbers of existing rulesets.
139a1dc2096SDima Dorfman.It Cm ruleset Ar ruleset
140a1dc2096SDima DorfmanSet ruleset number
141a1dc2096SDima Dorfman.Ar ruleset
142a1dc2096SDima Dorfmanas the current ruleset for the mount-point.
143a1dc2096SDima Dorfman.El
144a1dc2096SDima Dorfman.Ss Rule Specification
145a1dc2096SDima DorfmanRules have two parts: the conditions and the actions.
146111c3747SDima DorfmanThe conditions determine which DEVFS nodes the rule matches
147a1dc2096SDima Dorfmanand the actions determine what should be done when a rule matches a node.
148a1dc2096SDima DorfmanFor example, a rule can be written that sets the GID to
1491964f79aSPoul-Henning Kamp.Dq Li operator
1501964f79aSPoul-Henning Kampfor all devices of type tape.
151072af151SDima DorfmanIf the first token of a rule specification is a single dash
1527ba06023SRuslan Ermilov.Pq Sq Fl ,
153072af151SDima Dorfmanrules are read from the standard input and the rest of the specification
154072af151SDima Dorfmanis ignored.
155a1dc2096SDima Dorfman.Pp
156a1dc2096SDima DorfmanThe following conditions are recognized.
157a1dc2096SDima DorfmanConditions are ANDed together when matching a device;
158a1dc2096SDima Dorfmanif OR is desired, multiple rules can be written.
15921c2aa5eSJoel Dahl.Bl -tag -width 15n
160a1dc2096SDima Dorfman.It Cm path Ar pattern
161a1dc2096SDima DorfmanMatches any node with a path that matches
162111c3747SDima Dorfman.Ar pattern ,
163111c3747SDima Dorfmanwhich is interpreted as a
164a1dc2096SDima Dorfman.Xr glob 3 Ns -style
165a1dc2096SDima Dorfmanpattern.
166a1dc2096SDima Dorfman.It Cm type Ar devtype
167a1dc2096SDima DorfmanMatches any node that is of type
168a1dc2096SDima Dorfman.Ar devtype .
169a1dc2096SDima DorfmanValid types are
1707ba06023SRuslan Ermilov.Cm disk , mem , tape
171a1dc2096SDima Dorfmanand
1727ba06023SRuslan Ermilov.Cm tty .
173a1dc2096SDima Dorfman.El
174a1dc2096SDima Dorfman.Pp
175a1dc2096SDima DorfmanThe following actions are recognized.
176a1dc2096SDima DorfmanAlthough there is no explicit delimiter between conditions and actions,
177a1dc2096SDima Dorfmanthey may not be intermixed.
17821c2aa5eSJoel Dahl.Bl -tag -width 15n
179a1dc2096SDima Dorfman.It Cm group Ar gid
180a1dc2096SDima DorfmanSet the GID of the node to
181a1dc2096SDima Dorfman.Ar gid ,
182a1dc2096SDima Dorfmanwhich may be a group name
183a1dc2096SDima Dorfman(looked up in
184a1dc2096SDima Dorfman.Pa /etc/group )
185a1dc2096SDima Dorfmanor number.
186a1dc2096SDima Dorfman.It Cm hide
187a1dc2096SDima DorfmanHide the node.
188a1dc2096SDima DorfmanNodes may later be revived manually with
189111c3747SDima Dorfman.Xr mknod 8
190a1dc2096SDima Dorfmanor with the
191a1dc2096SDima Dorfman.Cm unhide
192a1dc2096SDima Dorfmanaction.
19336ad3f47SJaakko HeinonenHiding a directory node effectively hides all of its child nodes.
194a1dc2096SDima Dorfman.It Cm include Ar ruleset
195a1dc2096SDima DorfmanApply all the rules in ruleset number
196a1dc2096SDima Dorfman.Ar ruleset
197a1dc2096SDima Dorfmanto the node.
198a1dc2096SDima DorfmanThis does not necessarily result in any changes to the node
199a1dc2096SDima Dorfman(e.g., if none of the rules in the included ruleset match).
200ebae8e93SGavin AtkinsonInclude commands in the referenced
201ebae8e93SGavin Atkinson.Ar ruleset
202ebae8e93SGavin Atkinsonare not resolved.
203a1dc2096SDima Dorfman.It Cm mode Ar filemode
204a1dc2096SDima DorfmanSet the file mode to
205a1dc2096SDima Dorfman.Ar filemode ,
2061cf7cec3SDima Dorfmanwhich is interpreted as in
2071cf7cec3SDima Dorfman.Xr chmod 1 .
208a1dc2096SDima Dorfman.It Cm user Ar uid
209a1dc2096SDima DorfmanSet the UID to
210a1dc2096SDima Dorfman.Ar uid ,
211a1dc2096SDima Dorfmanwhich may be a user name
212a1dc2096SDima Dorfman(looked up in
213a1dc2096SDima Dorfman.Pa /etc/passwd )
214a1dc2096SDima Dorfmanor number.
215a1dc2096SDima Dorfman.It Cm unhide
216a1dc2096SDima DorfmanUnhide the node.
21736ad3f47SJaakko HeinonenIf the node resides in a subdirectory,
21836ad3f47SJaakko Heinonenall parent directory nodes must be visible to be able to access the node.
219a1dc2096SDima Dorfman.El
220014c2ea5SDima Dorfman.Sh IMPLEMENTATION NOTES
221111c3747SDima DorfmanRulesets are created by the kernel at the first reference
222a1dc2096SDima Dorfmanand destroyed when the last reference disappears.
223a1dc2096SDima DorfmanE.g., a ruleset is created when a rule is added to it or when it is set
224111c3747SDima Dorfmanas the current ruleset for a mount-point, and
225111c3747SDima Dorfmana ruleset is destroyed when the last rule in it is deleted
226a1dc2096SDima Dorfmanand no other references to it exist
227111c3747SDima Dorfman(i.e., it is not included by any rules and it is not the current ruleset
228a1dc2096SDima Dorfmanfor any mount-point).
229014c2ea5SDima Dorfman.Pp
230a1dc2096SDima DorfmanRuleset number 0 is the default ruleset for all new mount-points.
231a1dc2096SDima DorfmanIt is always empty, cannot be modified or deleted, and does not show up
232a1dc2096SDima Dorfmanin the output of
233a1dc2096SDima Dorfman.Cm showsets .
234014c2ea5SDima Dorfman.Pp
235a1dc2096SDima DorfmanRules and rulesets are unique to the entire system,
236a1dc2096SDima Dorfmannot a particular mount-point.
237a1dc2096SDima DorfmanI.e., a
238a1dc2096SDima Dorfman.Cm showsets
239a1dc2096SDima Dorfmanwill return the same information regardless of the mount-point specified with
240a1dc2096SDima Dorfman.Fl m .
241111c3747SDima DorfmanThe mount-point is only relevant when changing what its current ruleset is
242a1dc2096SDima Dorfmanor when using one of the apply commands.
24355c82bf0SRuslan Ermilov.Sh FILES
24421c2aa5eSJoel Dahl.Bl -tag -width "Pa /usr/share/examples/etc/devfs.conf" -compact
24555c82bf0SRuslan Ermilov.It Pa /etc/defaults/devfs.rules
24622425699SDaniel GerzoDefault
24722425699SDaniel Gerzo.Nm
24822425699SDaniel Gerzoconfiguration file.
24955c82bf0SRuslan Ermilov.It Pa /etc/devfs.rules
25022425699SDaniel GerzoLocal
25122425699SDaniel Gerzo.Nm
252*e441cce6SSevan Janiyanconfiguration file.
253*e441cce6SSevan JaniyanRulesets in here override those in
254ebae8e93SGavin Atkinson.Pa /etc/defaults/devfs.rules
255ebae8e93SGavin Atkinsonwith the same ruleset number, otherwise the two files are effectively merged.
25622425699SDaniel Gerzo.It Pa /etc/devfs.conf
25722425699SDaniel GerzoBoot-time
25822425699SDaniel Gerzo.Nm
25922425699SDaniel Gerzoconfiguration file.
26022425699SDaniel Gerzo.It Pa /usr/share/examples/etc/devfs.conf
26122425699SDaniel GerzoExample boot-time
26222425699SDaniel Gerzo.Nm
26322425699SDaniel Gerzoconfiguration file.
26455c82bf0SRuslan Ermilov.El
265014c2ea5SDima Dorfman.Sh EXAMPLES
266a1dc2096SDima DorfmanWhen the system boots,
267a1dc2096SDima Dorfmanthe only ruleset that exists is ruleset number 0;
268a1dc2096SDima Dorfmansince the latter may not be modified, we have to create another ruleset
269a1dc2096SDima Dorfmanbefore adding rules.
2707ba06023SRuslan ErmilovNote that since most of the following examples do not specify
271a1dc2096SDima Dorfman.Fl m ,
272a1dc2096SDima Dorfmanthe operations are performed on
273a1dc2096SDima Dorfman.Pa /dev
274a1dc2096SDima Dorfman(this only matters for things that might change the properties of nodes).
275a1dc2096SDima Dorfman.Pp
276a1dc2096SDima DorfmanSpecify that ruleset 10 should be the current ruleset for
277a1dc2096SDima Dorfman.Pa /dev
278309bbfe8SJoel Dahl(if it does not already exist, it is created):
279a1dc2096SDima Dorfman.Pp
280309bbfe8SJoel Dahl.Dl "devfs ruleset 10"
281a1dc2096SDima Dorfman.Pp
282a1dc2096SDima DorfmanAdd a rule that causes all nodes that have a path that matches
2837ba06023SRuslan Ermilov.Dq Li speaker
284a1dc2096SDima Dorfman(this is only
285a1dc2096SDima Dorfman.Pa /dev/speaker )
286a1dc2096SDima Dorfmanto have the file mode 666 (read and write for all).
287a1dc2096SDima DorfmanNote that if any such nodes already exist, their mode will not be changed
288a1dc2096SDima Dorfmanunless this rule (or ruleset) is explicitly applied (see below).
289a1dc2096SDima DorfmanThe mode
290a1dc2096SDima Dorfman.Em will
291a1dc2096SDima Dorfmanbe changed if the node is created
292a1dc2096SDima Dorfman.Em after
293a1dc2096SDima Dorfmanthe rule is added
294a1dc2096SDima Dorfman(e.g., the
295a1dc2096SDima Dorfman.Pa atspeaker
296309bbfe8SJoel Dahlmodule is loaded after the above rule is added):
297a1dc2096SDima Dorfman.Pp
298309bbfe8SJoel Dahl.Dl "devfs rule add path speaker mode 666"
299a1dc2096SDima Dorfman.Pp
300a1dc2096SDima DorfmanApply all the rules in the current ruleset to all the existing nodes.
301309bbfe8SJoel DahlE.g., if the below rule was added after
302a1dc2096SDima Dorfman.Pa /dev/speaker
303a1dc2096SDima Dorfmanwas created,
304111c3747SDima Dorfmanthis command will cause its file mode to be changed to 666
305309bbfe8SJoel Dahlas prescribed by the rule:
306a1dc2096SDima Dorfman.Pp
307309bbfe8SJoel Dahl.Dl "devfs rule applyset"
308a1dc2096SDima Dorfman.Pp
3097ba06023SRuslan ErmilovFor all devices with a path that matches
3107ba06023SRuslan Ermilov.Dq Li snp* ,
31155f77691SPoul-Henning Kampset the file mode to 660 and the GID to
3127ba06023SRuslan Ermilov.Dq Li snoopers .
313a1dc2096SDima DorfmanThis permits users in the
3147ba06023SRuslan Ermilov.Dq Li snoopers
315a1dc2096SDima Dorfmangroup to use the
316a1dc2096SDima Dorfman.Xr snp 4
317309bbfe8SJoel Dahldevices
318309bbfe8SJoel Dahl(quoting the argument to
319309bbfe8SJoel Dahl.Cm path
320309bbfe8SJoel Dahlis often necessary to disable the shell's globbing features):
321a1dc2096SDima Dorfman.Pp
322309bbfe8SJoel Dahl.Dl devfs rule add path "snp*" mode 660 group snoopers
323a1dc2096SDima Dorfman.Pp
324a1dc2096SDima DorfmanAdd a rule to ruleset number 20.
325a1dc2096SDima DorfmanSince this ruleset is not the current ruleset for any mount-points,
326a1dc2096SDima Dorfmanthis rule is never applied automatically (unless ruleset 20 becomes
327309bbfe8SJoel Dahla current ruleset for some mount-point at a later time):
328309bbfe8SJoel Dahl.Pp
329309bbfe8SJoel Dahl.Dl "devfs rule -s 20 add type disk group wheel"
330309bbfe8SJoel Dahl.Pp
331309bbfe8SJoel DahlExplicitly apply all rules in ruleset number 20 to the DEVFS mount on
332309bbfe8SJoel Dahl.Pa /my/jail/dev .
333309bbfe8SJoel DahlIt does not matter that ruleset 20 is not the current ruleset for that
334309bbfe8SJoel Dahlmount-point; the rules are still applied:
335a1dc2096SDima Dorfman.Pp
3367ba06023SRuslan Ermilov.Dl "devfs -m /my/jail/dev rule -s 20 applyset"
337a1dc2096SDima Dorfman.Pp
338309bbfe8SJoel DahlSince the following rule has no conditions, the action
339309bbfe8SJoel Dahl.Pq Cm hide
340309bbfe8SJoel Dahlwill be applied to all nodes:
341a1dc2096SDima Dorfman.Pp
3427ba06023SRuslan Ermilov.Dl "devfs rule apply hide"
343a1dc2096SDima Dorfman.Pp
344309bbfe8SJoel DahlSince hiding all nodes is not very useful, we can undo it.
345309bbfe8SJoel DahlThe following applies
346309bbfe8SJoel Dahl.Cm unhide
347309bbfe8SJoel Dahlto all the nodes,
348309bbfe8SJoel Dahlcausing them to reappear:
349a1dc2096SDima Dorfman.Pp
3507ba06023SRuslan Ermilov.Dl "devfs rule apply unhide"
351072af151SDima Dorfman.Pp
352309bbfe8SJoel DahlAdd all the rules from the file
353309bbfe8SJoel Dahl.Pa my_rules
354309bbfe8SJoel Dahlto ruleset 10:
355072af151SDima Dorfman.Pp
356111c3747SDima Dorfman.Dl "devfs rule -s 10 add - < my_rules"
357072af151SDima Dorfman.Pp
358309bbfe8SJoel DahlThe below copies all the rules from ruleset 20 into ruleset 10.
359072af151SDima DorfmanThe rule numbers are preserved,
360072af151SDima Dorfmanbut ruleset 10 may already have rules with non-conflicting numbers
361072af151SDima Dorfman(these will be preserved).
362309bbfe8SJoel DahlSince
363309bbfe8SJoel Dahl.Cm show
364309bbfe8SJoel Dahloutputs valid rules,
365309bbfe8SJoel Dahlthis feature can be used to copy rulesets:
366309bbfe8SJoel Dahl.Pp
367309bbfe8SJoel Dahl.Dl "devfs rule -s 20 show | devfs rule -s 10 add -"
368a1dc2096SDima Dorfman.Sh SEE ALSO
369d54277a7SSimon L. B. Nielsen.Xr chmod 1 ,
370a1dc2096SDima Dorfman.Xr jail 2 ,
371a1dc2096SDima Dorfman.Xr glob 3 ,
372a1dc2096SDima Dorfman.Xr devfs 5 ,
37322425699SDaniel Gerzo.Xr devfs.conf 5 ,
37422425699SDaniel Gerzo.Xr devfs.rules 5 ,
375a1dc2096SDima Dorfman.Xr chown 8 ,
376a1dc2096SDima Dorfman.Xr jail 8 ,
377a1dc2096SDima Dorfman.Xr mknod 8
378*e441cce6SSevan Janiyan.Sh HISTORY
379*e441cce6SSevan JaniyanThe
380*e441cce6SSevan Janiyan.Nm
381*e441cce6SSevan Janiyanutility first appeared in
382*e441cce6SSevan Janiyan.Fx 5.0 .
383a1dc2096SDima Dorfman.Sh AUTHORS
384a1dc2096SDima Dorfman.An Dima Dorfman
385