DragonFly On-Line Manual Pages
DEVFSCTL(8) DragonFly System Manager's Manual DEVFSCTL(8)
devfsctl -- manipulate devfs rules
devfsctl -a -f file [-m mount_point]
devfsctl -d -f file
devfsctl -c [-m mount_point]
devfsctl -r [-m mount_point]
The devfsctl provides an interface to manipulate the in-kernel devfs(5)
The options are as follows:
-a Load the ruleset specified by -f and apply it. It will not over-
write currently applied rules, but just append the new ones.
-c Clear the current ruleset. This does not reset the device nodes,
but only clear out all stored rules so that they are not applied
to new nodes. It is therefore recommended to use this command in
conjunction with -r.
-d Reads ruleset specified by -f and then dumps its contents to std-
out. The rules will not be applied. This option cannot be used
in conjunction with any other option. It is useful for checking
the correct syntax and order of the specified ruleset and will
show the final interpretation as it would be applied.
Specifies the file containing the ruleset to be loaded. This
option is a requirement for -a and -d.
-h Shows a usage message with a short description of devfsctl's
Specifies the mount point to which the loaded rules shall apply.
If this option is not specified, the rules will apply to all
devfs(5) mountpoints. The mount_point argument does not accept
wildcards and must be an absolute path.
-r Reset all devfs(5) nodes to their original status. This does not
clear the current ruleset and it is hence recommended to use this
command together with -c.
Rules are specified one rule per line, with whitespace separated values.
Empty lines and lines beginning with a ``#'' are ignored. Once applied,
the rules are in effect for existing device nodes as well as future ones.
Rules are applied in the order specified, thus later rules will override
Names used in devfs(5) rules can be either device names (? and * wild-
cards are allowed), device types or existing groups. Groups are refer-
enced in rules by prefixing them with `@'. A device type is one of the
following list of special names:
D_DISK disk devices/slices/partitions
D_TAPE tape devices
D_MEM (kernel) memory devices
D_TTY tty devices
Rule lines are of the following format:
action argument ...
Valid actions are group, include, hide, jail, link, perm and show:
group group_name name ...
This will group the specified names into a group of the
Includes the specified rule file and processes its rules.
This will hide the device node(s) specified by name. A
hidden node will not appear in directory listings and all
operations on it will fail, except if it is open already.
By default, everything except pty(4) nodes is shown.
A `yes' argument will cause all following rules to only
apply to mounts of devfs(5) inside a jail(8), until a
``jail no'' is reached.
link device path
link rules will create a link node at the specified
link_path to the given device. The path is relative to the
mountpoint being operated on (see devfsctl(8)'s -m option),
which is usually /dev.
Note that for link rules, the device has to be a single
device node and specifying a device type or group (unless
it contains only one node) is not possible.
perm name user:group mode
A perm rule will applies the specified mode (octal, see
chmod(1)) and ownership (see chown(2)) to name.
This will show previously hidden nodes again.
Global devfs ruleset file
Local devfs ruleset file
Examples of valid names:
Examples of valid rules:
group foo da* ri*
group foo ad*
group foo md*
perm da0 uucp:dialer 0644
link foo bar
group g1 a b f g
group g2 c d
group g3 @g1 h @g2 i j k D_MEM
perm @g3 root:wheel 0644
group cdrom cd* acd*
group disks da*
group disks ad*
group drives @disks @cdrom
group test @disks @g2 y
link da0 "my drives/my new da0"
The devfsctl utility appeared in DragonFly 2.3.
DragonFly 4.3 August 25, 2009 DragonFly 4.3