From 072af1512885d3e06ba5c4d91da488ef3e4bdfa1 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
Date: Sun, 28 Jul 2002 06:45:30 +0000
Subject: Implement this (quoted from the updated man page): If the first token
of a rule specification is a single dash (``-''), rules are read from the
standard input and the rest of the specification is ignored.
---
sbin/devfs/devfs.8 | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
(limited to 'sbin/devfs/devfs.8')
diff --git a/sbin/devfs/devfs.8 b/sbin/devfs/devfs.8
index 11cede3563891..b22a9ad89e0a0 100644
--- a/sbin/devfs/devfs.8
+++ b/sbin/devfs/devfs.8
@@ -143,6 +143,10 @@ and the actions determine what should be done when a rule matches a node.
For example, a rule can be written that sets the GID to
.Li games
for all devices with major number 53.
+If the first token of a rule specification is a single dash
+.Pq Dq - ,
+rules are read from the standard input and the rest of the specification
+is ignored.
.Pp
The following conditions are recognized.
Conditions are ANDed together when matching a device;
@@ -311,6 +315,28 @@ will be applied to all nodes.
Since hiding all nodes isn't very useful, we can undo like so:
.Pp
.Dl devfs rule apply unhide
+.Pp
+which applies
+.Cm unhide
+to all the nodes,
+causing them to reappear.
+.Pp
+.Dl cat my_rules | devfs rule -s 10 add -
+.Pp
+Add all the rules from the file
+.Pa my_rules
+to ruleset 10.
+.Pp
+.Dl devfs rule -s 20 show | devfs rule -s 10 add -
+.Pp
+Since
+.Cm show
+outputs valid rules,
+this feature can be used to copy rulesets.
+The above copies all the rules from ruleset 20 into ruleset 10.
+The rule numbers are preserved,
+but ruleset 10 may already have rules with non-conflicting numbers
+(these will be preserved).
.Sh SEE ALSO
.Xr jail 2 ,
.Xr glob 3 ,
--
cgit v1.3