]>
Commit | Line | Data |
---|---|---|
1 | '\" t | |
2 | .TH "SYSTEMD\&.DEVICE" "5" "" "systemd 217" "systemd.device" | |
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 | systemd.device \- Device unit configuration | |
24 | .SH "SYNOPSIS" | |
25 | .PP | |
26 | \fIdevice\fR\&.device | |
27 | .SH "DESCRIPTION" | |
28 | .PP | |
29 | A unit configuration file whose name ends in | |
30 | "\&.device" | |
31 | encodes information about a device unit as exposed in the sysfs/\fBudev\fR(7) | |
32 | device tree\&. | |
33 | .PP | |
34 | This unit type has no specific options\&. See | |
35 | \fBsystemd.unit\fR(5) | |
36 | for the common options of all unit configuration files\&. The common configuration items are configured in the generic | |
37 | "[Unit]" | |
38 | and | |
39 | "[Install]" | |
40 | sections\&. A separate | |
41 | "[Device]" | |
42 | section does not exist, since no device\-specific options may be configured\&. | |
43 | .PP | |
44 | systemd will dynamically create device units for all kernel devices that are marked with the "systemd" udev tag (by default all block and network devices, and a few others)\&. This may be used to define dependencies between devices and other units\&. To tag a udev device, use | |
45 | "TAG+="systemd"" | |
46 | in the udev rules file, see | |
47 | \fBudev\fR(7) | |
48 | for details\&. | |
49 | .PP | |
50 | Device units are named after the | |
51 | /sys | |
52 | and | |
53 | /dev | |
54 | paths they control\&. Example: the device | |
55 | /dev/sda5 | |
56 | is exposed in systemd as | |
57 | dev\-sda5\&.device\&. For details about the escaping logic used to convert a file system path to a unit name see | |
58 | \fBsystemd.unit\fR(5)\&. | |
59 | .SH "THE UDEV DATABASE" | |
60 | .PP | |
61 | The settings of device units may either be configured via unit files, or directly from the udev database (which is recommended)\&. The following udev device properties are understood by systemd: | |
62 | .PP | |
63 | \fISYSTEMD_WANTS=\fR, \fISYSTEMD_USER_WANTS=\fR | |
64 | .RS 4 | |
65 | Adds dependencies of type | |
66 | \fIWants\fR | |
67 | from the device unit to all listed units\&. The first form is used by the system systemd instance, the second by user systemd instances\&. Those settings may be used to activate arbitrary units when a specific device becomes available\&. | |
68 | .sp | |
69 | Note that this and the other tags are not taken into account unless the device is tagged with the | |
70 | "systemd" | |
71 | string in the udev database, because otherwise the device is not exposed as a systemd unit (see above)\&. | |
72 | .sp | |
73 | Note that systemd will only act on | |
74 | \fIWants\fR | |
75 | dependencies when a device first becomes active\&. It will not act on them if they are added to devices that are already active\&. Use | |
76 | \fISYSTEMD_READY=\fR | |
77 | (see below) to influence on which udev event to trigger the dependencies\&. | |
78 | .RE | |
79 | .PP | |
80 | \fISYSTEMD_ALIAS=\fR | |
81 | .RS 4 | |
82 | Adds an additional alias name to the device unit\&. This must be an absolute path that is automatically transformed into a unit name\&. (See above\&.) | |
83 | .RE | |
84 | .PP | |
85 | \fISYSTEMD_READY=\fR | |
86 | .RS 4 | |
87 | If set to 0, systemd will consider this device unplugged even if it shows up in the udev tree\&. If this property is unset or set to 1, the device will be considered plugged if it is visible in the udev tree\&. This property has no influence on the behavior when a device disappears from the udev tree\&. | |
88 | .sp | |
89 | This option is useful to support devices that initially show up in an uninitialized state in the tree, and for which a | |
90 | "changed" | |
91 | event is generated the moment they are fully set up\&. Note that | |
92 | \fISYSTEMD_WANTS=\fR | |
93 | (see above) is not acted on as long as | |
94 | \fISYSTEMD_READY=0\fR | |
95 | is set for a device\&. | |
96 | .RE | |
97 | .PP | |
98 | \fIID_MODEL_FROM_DATABASE=\fR, \fIID_MODEL=\fR | |
99 | .RS 4 | |
100 | If set, this property is used as description string for the device unit\&. | |
101 | .RE | |
102 | .SH "SEE ALSO" | |
103 | .PP | |
104 | \fBsystemd\fR(1), | |
105 | \fBsystemctl\fR(1), | |
106 | \fBsystemd.unit\fR(5), | |
107 | \fBudev\fR(7), | |
108 | \fBsystemd.directives\fR(7) |