DragonFly On-Line Manual Pages

Search: Section:  


DEVFSCTL(8)            DragonFly System Manager's Manual           DEVFSCTL(8)

NAME

devfsctl -- manipulate devfs rules

SYNOPSIS

devfsctl -a -f file [-m mount_point] devfsctl -d -f file devfsctl -c [-m mount_point] devfsctl -r [-m mount_point] devfsctl -h

DESCRIPTION

The devfsctl provides an interface to manipulate the in-kernel devfs(5) ruleset. The options are as follows: -a Load the ruleset specified by -f and apply it. It will not overwrite 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 stdout. 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. -f file 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 options. -m mount_point 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.

RULE SYNTAX

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 prior ones. Names used in devfs(5) rules can be either device names (? and * wildcards are allowed), device types or existing groups. Groups are referenced 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 specified group_name. include file Includes the specified rule file and processes its rules. hide name 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. jail yes|no 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 the -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. show name This will show previously hidden nodes again.

FILES

/etc/defaults/devfs.conf Global devfs ruleset file /etc/devfs.conf Local devfs ruleset file

EXAMPLES

Examples of valid names: bpf* tun0 D_DISK serno/*s3 @groupA Examples of valid rules: group foo da* ri* group foo ad* group foo md* perm da0 uucp:dialer 0644 link foo bar hide @foo show D_DISK group g1 a b f g group g2 c d group g3 @g1 h @g2 i j k D_MEM jail yes hide @g3 perm @g3 root:wheel 0644 jail no group cdrom cd* acd* group disks da* group disks ad* group drives @disks @cdrom group test @disks @g2 y show @drives show @disks show @test link da0 "my drives/my new da0"

SEE ALSO

devfs(5), mount_devfs(8)

HISTORY

The devfsctl utility appeared in DragonFly 2.3.

AUTHORS

Alex Hornung DragonFly 5.5 August 25, 2009 DragonFly 5.5

Search: Section: