]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/hwdb.xml
Merge pull request #176 from filbranden/test_cgroup_mask1
[thirdparty/systemd.git] / man / hwdb.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <refentry id="hwdb" conditional="ENABLE_HWDB">
9 <refentryinfo>
10 <title>hwdb</title>
11 <productname>systemd</productname>
12 <authorgroup>
13 <author>
14 <contrib>Developer</contrib>
15 <firstname>Kay</firstname>
16 <surname>Sievers</surname>
17 <email>kay@vrfy.org</email>
18 </author>
19 <author>
20 <contrib>Developer</contrib>
21 <firstname>Tom</firstname>
22 <surname>Gundersen</surname>
23 <email>teg@jklm.no</email>
24 </author>
25 </authorgroup>
26 </refentryinfo>
27
28 <refmeta>
29 <refentrytitle>hwdb</refentrytitle>
30 <manvolnum>7</manvolnum>
31 </refmeta>
32
33 <refnamediv>
34 <refname>hwdb</refname>
35 <refpurpose>Hardware Database</refpurpose>
36 </refnamediv>
37
38 <refsect1><title>Description</title>
39 <para>The hardware database is a key-value store for associating modalias-like keys to
40 udev-properties-like values. It is used primarily by udev to add the relevant properties
41 to matching devices, but it can also be queried directly.</para>
42 </refsect1>
43
44 <refsect1><title>Hardware Database Files</title>
45 <para>The hwdb files are read from the files located in the
46 system hwdb directory <filename>&udevlibexecdir;/hwdb.d</filename>
47 and the local administration directory <filename>/etc/udev/hwdb.d</filename>.
48 All hwdb files are collectively sorted and processed in lexical order,
49 regardless of the directories in which they live. However, files with
50 identical filenames replace each other. Files in <filename>/etc</filename>
51 take precedence over files with the same name in <filename>&rootprefix;/lib</filename>.
52 This can be used to override a system-supplied hwdb file with a local file if needed;
53 a symlink in <filename>/etc</filename> with the same name as a hwdb file in
54 <filename>&rootprefix;/lib</filename>, pointing to <filename>/dev/null</filename>,
55 disables the hwdb file entirely. hwdb files must have the extension
56 <filename>.hwdb</filename>; other extensions are ignored.</para>
57
58 <para>The hwdb file contains data records consisting of matches and
59 associated key-value pairs. Every record in the hwdb starts with one or
60 more match string, specifying a shell glob to compare the database
61 lookup string against. Multiple match lines are specified in additional
62 consecutive lines. Every match line is compared individually, they are
63 combined by OR. Every match line must start at the first character of
64 the line.</para>
65
66 <para>The match lines are followed by one or more key-value pair lines, which
67 are recognized by a leading space character. The key name and value are separated
68 by <literal>=</literal>. An empty line signifies the end
69 of a record. Lines beginning with <literal>#</literal> are ignored.</para>
70
71 <para>The content of all hwdb files is read by
72 <citerefentry><refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
73 and compiled to a binary database located at <filename>/etc/udev/hwdb.bin</filename>,
74 or alternatively <filename>&udevlibexecdir;/hwdb.bin</filename> if you want ship the compiled
75 database in an immutable image.
76 During runtime only the binary database is used.</para>
77 </refsect1>
78
79 <refsect1>
80 <title>See Also</title>
81 <para>
82 <citerefentry>
83 <refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum>
84 </citerefentry>
85 </para>
86 </refsect1>
87 </refentry>