summaryrefslogtreecommitdiff
path: root/static/freebsd/man5/devfs.rules.5 3.html
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:43 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:43 -0400
commitac5e55f5f2af5b92794c2aded46c6bae85b5f5ed (patch)
tree9367490586c84cba28652e443e3166d66c33b0d9 /static/freebsd/man5/devfs.rules.5 3.html
parent253e67c8b3a72b3a4757fdbc5845297628db0a4a (diff)
docs: Added All FreeBSD Manuals
Diffstat (limited to 'static/freebsd/man5/devfs.rules.5 3.html')
-rw-r--r--static/freebsd/man5/devfs.rules.5 3.html102
1 files changed, 102 insertions, 0 deletions
diff --git a/static/freebsd/man5/devfs.rules.5 3.html b/static/freebsd/man5/devfs.rules.5 3.html
new file mode 100644
index 00000000..e494c989
--- /dev/null
+++ b/static/freebsd/man5/devfs.rules.5 3.html
@@ -0,0 +1,102 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">DEVFS.RULES(5)</td>
+ <td class="head-vol">File Formats Manual</td>
+ <td class="head-rtitle">DEVFS.RULES(5)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">devfs.rules</code> &#x2014;
+ <span class="Nd">devfs configuration information</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The <code class="Nm">devfs.rules</code> file provides an easy way
+ to create and apply <a class="Xr">devfs(8)</a> rules, even for devices that
+ are not available at boot.</p>
+<p class="Pp">For devices available at boot, see
+ <a class="Xr">devfs.conf(5)</a>.</p>
+<p class="Pp">The format of this file is simple. Empty lines and lines beginning
+ with a hash sign (&#x2018;<code class="Li">#</code>&#x2019;) are ignored. A
+ line between brackets denotes the start of a ruleset. In the brackets should
+ be the name of the ruleset and its number, separated by an equal sign.</p>
+<p class="Pp">Other lines are rule specifications as documented in
+ <a class="Xr">devfs(8)</a>, in the section
+ <a class="Sx" href="#Rule_Specification">Rule Specification</a>. These lines
+ are prepended with &#x201C;<code class="Li">rule</code>&#x201D; and are
+ passed to <a class="Xr">devfs(8)</a> by the startup scripts of the system.
+ It is important to put path elements that contain <a class="Xr">glob(3)</a>
+ special characters between quotes.</p>
+<p class="Pp">Rulesets should have a unique name and number.</p>
+<p class="Pp">All rules that follow a ruleset declaration belong to that
+ ruleset, until a new ruleset is started.</p>
+<p class="Pp">One custom ruleset has to be enabled in
+ <span class="Pa">/etc/rc.conf</span>, otherwise it will not be applied to
+ the <span class="Pa">/dev</span> file system by the default system startup
+ process. For example, to enable a
+ &#x201C;<code class="Li">localrules</code>&#x201D; ruleset for the
+ <span class="Pa">/dev</span> file system, you would have to use something
+ like this in your <span class="Pa">rc.conf</span> file:</p>
+<div class="Bd Pp Bd-indent Li">
+<pre>devfs_system_ruleset=&quot;localrules&quot;</pre>
+</div>
+<p class="Pp">The rules are loaded at boot via the devfs service. To load
+ modified rules after the system has booted, run the command:</p>
+<div class="Bd Pp Bd-indent Li">
+<pre>service devfs restart</pre>
+</div>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
+<dl class="Bl-tag Bl-compact">
+ <dt><span class="Pa">/etc/defaults/devfs.rules</span></dt>
+ <dd>Default <code class="Nm">devfs.rules</code> configuration file.</dd>
+ <dt><span class="Pa">/etc/devfs.rules</span></dt>
+ <dd>Local <code class="Nm">devfs.rules</code> configuration file. Rulesets in
+ here override those in <span class="Pa">/etc/defaults/devfs.rules</span>
+ with the same ruleset number, otherwise the two files are effectively
+ merged.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
+<p class="Pp">To make all the partitions of <a class="Xr">da(4)</a> devices
+ readable and writable by their owner and the
+ &#x201C;<code class="Li">usb</code>&#x201D; group, the following rule may be
+ used:</p>
+<p class="Pp"></p>
+<div class="Bd Bd-indent"><code class="Li">[localrules=10]</code></div>
+<div class="Bd Bd-indent"><code class="Li">add path 'da*s*' mode 0660 group
+ usb</code></div>
+<p class="Pp">The first line declares and starts a new ruleset, with the name
+ <var class="Va">localrules</var> and the number 10.</p>
+<p class="Pp">To give <a class="Xr">usbconfig(8)</a> and
+ <a class="Xr">libusb(3)</a> enabled applications permission to all usb
+ devices for their owner and the &#x201C;<code class="Li">usb</code>&#x201D;
+ group, a similar rule may be used:</p>
+<p class="Pp"></p>
+<div class="Bd Bd-indent"><code class="Li">add path 'usb/*' mode 0660 group
+ usb</code></div>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">glob(3)</a>, <a class="Xr">devfs(4)</a>,
+ <a class="Xr">devfs.conf(5)</a>, <a class="Xr">devfs(8)</a>,
+ <a class="Xr">service(8)</a></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
+<p class="Pp">This manual page was written by <span class="An">Roland
+ Smith</span>
+ &lt;<a class="Mt" href="mailto:rsmith@xs4all.nl">rsmith@xs4all.nl</a>&gt;.</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">December 1, 2020</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>