chiark / gitweb /
nspawn: '-C' option has been removed
[elogind.git] / man / systemd.device.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU Lesser General Public License as published by
13   the Free Software Foundation; either version 2.1 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   Lesser General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="systemd.device">
26         <refentryinfo>
27                 <title>systemd.device</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd.device</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd.device</refname>
47                 <refpurpose>Device unit configuration</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename><replaceable>device</replaceable>.device</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>A unit configuration file whose name ends in
58                 <filename>.device</filename> encodes information about
59                 a device unit as exposed in the
60                 sysfs/<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
61                 device tree.</para>
62
63                 <para>This unit type has no specific options. See
64                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65                 for the common options of all unit configuration
66                 files. The common configuration items are configured
67                 in the generic <literal>[Unit]</literal> and
68                 <literal>[Install]</literal> sections. A separate
69                 <literal>[Device]</literal> section does not exist,
70                 since no device-specific options may be
71                 configured.</para>
72
73                 <para>systemd will automatically create dynamic device
74                 units for all kernel devices that are marked with the
75                 "systemd" udev tag (by default all block and network
76                 devices, and a few others). This may be used to define
77                 dependencies between devices and other
78                 units.</para>
79
80                 <para>Device units are named after the
81                 <filename>/sys</filename> and
82                 <filename>/dev</filename> paths they control. Example:
83                 the device <filename noindex='true'>/dev/sda5</filename> is exposed
84                 in systemd as <filename>dev-sda5.device</filename>. For
85                 details about the escaping logic used to convert a
86                 file system path to a unit name see
87                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
88
89         </refsect1>
90
91         <refsect1>
92                 <title>The udev Database</title>
93
94                 <para>The settings of device units may either be
95                 configured via unit files, or directly from the udev
96                 database (which is recommended). The following udev
97                 properties are understood by systemd:</para>
98
99                 <variablelist class='udev-directives'>
100                         <varlistentry>
101                                 <term><varname>SYSTEMD_WANTS=</varname></term>
102                                 <listitem><para>Adds dependencies of
103                                 type <varname>Wants</varname> from
104                                 this unit to all listed units. This
105                                 may be used to activate arbitrary
106                                 units, when a specific device becomes
107                                 available. Note that this and the
108                                 other tags are not taken into account
109                                 unless the device is tagged with the
110                                 "<literal>systemd</literal>" string in
111                                 the udev database, because otherwise
112                                 the device is not exposed as systemd
113                                 unit.</para></listitem>
114                         </varlistentry>
115
116                         <varlistentry>
117                                 <term><varname>SYSTEMD_ALIAS=</varname></term>
118                                 <listitem><para>Adds an additional
119                                 alias name to the device unit. This
120                                 must be an absolute path that is
121                                 automatically transformed into a unit
122                                 name. (See above.)</para></listitem>
123                         </varlistentry>
124
125                         <varlistentry>
126                                 <term><varname>SYSTEMD_READY=</varname></term>
127                                 <listitem><para>If set to 0 systemd
128                                 will consider this device unplugged
129                                 even if it shows up in the udev
130                                 tree. If this property is unset or set
131                                 to 1 the device will be considered
132                                 plugged the moment it shows up in the
133                                 udev tree. This property has no
134                                 influence on the behavior when a
135                                 device disappears from the udev
136                                 tree. This option is useful to support
137                                 devices that initially show up in an
138                                 uninitialized state in the tree, and for
139                                 which a changed event is generated the
140                                 moment they are fully set
141                                 up.</para></listitem>
142                         </varlistentry>
143
144                         <varlistentry>
145                                 <term><varname>ID_MODEL_FROM_DATABASE=</varname></term>
146                                 <term><varname>ID_MODEL=</varname></term>
147
148                                 <listitem><para>If set, this property is
149                                 used as description string for the
150                                 device unit.</para></listitem>
151                         </varlistentry>
152
153                 </variablelist>
154
155
156         </refsect1>
157
158         <refsect1>
159                   <title>See Also</title>
160                   <para>
161                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
162                           <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
163                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
164                           <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
165                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
166                   </para>
167         </refsect1>
168
169 </refentry>