]> git.proxmox.com Git - systemd.git/blob - man/hwdb.7
a0fba2b4cf1e484a59c785b98b1abd4ef980a3c2
[systemd.git] / man / hwdb.7
1 '\" t
2 .TH "HWDB" "7" "" "systemd 219" "hwdb"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 hwdb \- Hardware Database
24 .SH "DESCRIPTION"
25 .PP
26 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\&.
27 .SH "HARDWARE DATABASE FILES"
28 .PP
29 The hwdb files are read from the files located in the system hwdb directory
30 /usr/lib/udev/hwdb\&.d, the volatile runtime directory
31 /run/udev/hwdb\&.d
32 and the local administration directory
33 /etc/udev/hwdb\&.d\&. 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
34 /etc
35 have the highest priority, files in
36 /run
37 take precedence over files with the same name in
38 /usr/lib\&. This can be used to override a system\-supplied hwdb file with a local file if needed; a symlink in
39 /etc
40 with the same name as a hwdb file in
41 /usr/lib, pointing to
42 /dev/null, disables the hwdb file entirely\&. hwdb files must have the extension
43 \&.hwdb; other extensions are ignored\&.
44 .PP
45 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\&.
46 .PP
47 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
48 "="\&. An empty line signifies the end of a record\&. Lines beginning with
49 "#"
50 are ignored\&.
51 .PP
52 The content of all hwdb files is read by
53 \fBsystemd-hwdb\fR(8)
54 and compiled to a binary database located at
55 /etc/udev/hwdb\&.bin, or alternatively
56 /usr/lib/udev/hwdb\&.bin
57 if you want ship the compiled database in an immutable image\&. During runtime only the binary database is used\&.
58 .SH "SEE ALSO"
59 .PP
60 \fBsystemd-hwdb\fR(8)