systemd/man/hwdb.html
2015-02-17 11:22:16 +01:00

54 lines
4.4 KiB
HTML

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>hwdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="hwdb"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hwdb — Hardware Database</p></div><div class="refsect1"><a name="idm140730111822256"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>The hardware database is a key-value store for associating modalias-like keys to
udev-properties-like values. It is used primarily by udev to add the relevant properties
to matching devices, but it can also be queried directly.</p></div><div class="refsect1"><a name="idm140730111820944"></a><h2 id="Hardware Database Files">Hardware Database Files<a class="headerlink" title="Permalink to this headline" href="#Hardware%20Database%20Files"></a></h2><p>The hwdb files are read from the files located in the
system hwdb directory <code class="filename">/usr/lib/udev/hwdb.d</code>,
the volatile runtime directory <code class="filename">/run/udev/hwdb.d</code>
and the local administration directory <code class="filename">/etc/udev/hwdb.d</code>.
All hwdb files are collectively sorted and processed in lexical order,
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <code class="filename">/etc</code>
have the highest priority, files in <code class="filename">/run</code> take precedence
over files with the same name in <code class="filename">/usr/lib</code>. This can be
used to override a system-supplied hwdb file with a local file if needed;
a symlink in <code class="filename">/etc</code> with the same name as a hwdb file in
<code class="filename">/usr/lib</code>, pointing to <code class="filename">/dev/null</code>,
disables the hwdb file entirely. hwdb files must have the extension
<code class="filename">.hwdb</code>; other extensions are ignored.</p><p>The hwdb file contains data records consisting of matches and
associated key-value pairs. Every record in the hwdb starts with one or
more match string, specifying a shell glob to compare the database
lookup string against. Multiple match lines are specified in additional
consecutive lines. Every match line is compared indivdually, they are
combined by OR. Every match line must start at the first character of
the line.</p><p>The match lines are followed by one or more key-value pair lines, which
are recognized by a leading space character. The key name and value are separated
by "<code class="literal">=</code>". An empty line signifies the end
of a record. Lines beginning with "<code class="literal">#</code>" are ignored.</p><p>The content of all hwdb files is read by
<a href="systemd-hwdb.html"><span class="citerefentry"><span class="refentrytitle">systemd-hwdb</span>(8)</span></a>
and compiled to a binary database located at <code class="filename">/etc/udev/hwdb.bin</code>,
or alternatively <code class="filename">/usr/lib/udev/hwdb.bin</code> if you want ship the compiled
database in an immutable image.
During runtime only the binary database is used.</p></div><div class="refsect1"><a name="idm140730111807056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-hwdb.html"><span class="citerefentry"><span class="refentrytitle">systemd-hwdb</span>(8)</span></a>
</p></div></div></body></html>