1SYSTEMD.DEVICE(5)               systemd.device               SYSTEMD.DEVICE(5)
2
3
4

NAME

6       systemd.device - Device unit configuration
7

SYNOPSIS

9       device.device
10

DESCRIPTION

12       A unit configuration file whose name ends in ".device" encodes
13       information about a device unit as exposed in the sysfs/udev(7) device
14       tree.
15
16       This unit type has no specific options. See systemd.unit(5) for the
17       common options of all unit configuration files. The common
18       configuration items are configured in the generic "[Unit]" and
19       "[Install]" sections. A separate "[Device]" section does not exist,
20       since no device-specific options may be configured.
21
22       systemd will dynamically create device units for all kernel devices
23       that are marked with the "systemd" udev tag (by default all block and
24       network devices, and a few others). This may be used to define
25       dependencies between devices and other units. To tag a udev device, use
26       "TAG+="systemd"" in the udev rules file, see udev(7) for details.
27
28       Device units are named after the /sys and /dev paths they control.
29       Example: the device /dev/sda5 is exposed in systemd as dev-sda5.device.
30       For details about the escaping logic used to convert a file system path
31       to a unit name see systemd.unit(5).
32
33       Device units will be reloaded by systemd whenever the corresponding
34       device generates a "changed" event. Other units can use
35       ReloadPropagatedFrom= to react to that event
36

AUTOMATIC DEPENDENCIES

38   Implicit Dependencies
39       Many unit types automatically acquire dependencies on device units of
40       devices they require. For example, .socket unit acquire dependencies on
41       the device units of the network interface specified in BindToDevice=.
42       Similar, swap and mount units acquire dependencies on the units
43       encapsulating their backing block devices.
44
45   Default Dependencies
46       There are no default dependencies for device units.
47

THE UDEV DATABASE

49       Unit settings of device units may either be configured via unit files,
50       or directly from the udev database. The following udev device
51       properties are understood by the service manager:
52
53       SYSTEMD_WANTS=, SYSTEMD_USER_WANTS=
54           Adds dependencies of type Wants= from the device unit to the
55           specified units.  SYSTEMD_WANTS= is read by the system service
56           manager, SYSTEMD_USER_WANTS= by user service manager instances.
57           These properties may be used to activate arbitrary units when a
58           specific device becomes available.
59
60           Note that this and the other udev device properties are not taken
61           into account unless the device is tagged with the "systemd" tag in
62           the udev database, because otherwise the device is not exposed as a
63           systemd unit (see above).
64
65           Note that systemd will only act on Wants= dependencies when a
66           device first becomes active. It will not act on them if they are
67           added to devices that are already active. Use SYSTEMD_READY= (see
68           below) to configure when a udev device shall be considered active,
69           and thus when to trigger the dependencies.
70
71           The specified property value should be a space-separated list of
72           valid unit names. If a unit template name is specified (that is, a
73           unit name containing an "@" character indicating a unit name to use
74           for multiple instantiation, but with an empty instance name
75           following the "@"), it will be automatically instantiated by the
76           device's "sysfs" path (that is: the path is escaped and inserted as
77           instance name into the template unit name). This is useful in order
78           to instantiate a specific template unit once for each device that
79           appears and matches specific properties.
80
81       SYSTEMD_ALIAS=
82           Adds an additional alias name to the device unit. This must be an
83           absolute path that is automatically transformed into a unit name.
84           (See above.)
85
86       SYSTEMD_READY=
87           If set to 0, systemd will consider this device unplugged even if it
88           shows up in the udev tree. If this property is unset or set to 1,
89           the device will be considered plugged if it is visible in the udev
90           tree.
91
92           This option is useful for devices that initially show up in an
93           uninitialized state in the tree, and for which a "changed" event is
94           generated the moment they are fully set up. Note that
95           SYSTEMD_WANTS= (see above) is not acted on as long as
96           SYSTEMD_READY=0 is set for a device.
97
98       ID_MODEL_FROM_DATABASE=, ID_MODEL=
99           If set, this property is used as description string for the device
100           unit.
101

SEE ALSO

103       systemd(1), systemctl(1), systemd.unit(5), udev(7),
104       systemd.directives(7)
105
106
107
108systemd 239                                                  SYSTEMD.DEVICE(5)
Impressum