chiark / gitweb /
importd: enable btrfs quota in /var/lib/machines, if necessary
[elogind.git] / man / udev.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
5 <refentry id="udev">
6   <refentryinfo>
7     <title>udev</title>
8     <productname>systemd</productname>
9     <authorgroup>
10       <author>
11         <contrib>Developer</contrib>
12         <firstname>Greg</firstname>
13         <surname>Kroah-Hartmann</surname>
14         <email>greg@kroah.com</email>
15       </author>
16       <author>
17         <contrib>Developer</contrib>
18         <firstname>Kay</firstname>
19         <surname>Sievers</surname>
20         <email>kay@vrfy.org</email>
21       </author>
22     </authorgroup>
23   </refentryinfo>
24
25   <refmeta>
26     <refentrytitle>udev</refentrytitle>
27     <manvolnum>7</manvolnum>
28   </refmeta>
29
30   <refnamediv>
31     <refname>udev</refname>
32     <refpurpose>Dynamic device management</refpurpose>
33   </refnamediv>
34
35   <refsect1><title>Description</title>
36     <para>udev supplies the system software with device events, manages permissions
37     of device nodes and may create additional symlinks in the <filename>/dev</filename>
38     directory, or renames network interfaces. The kernel usually just assigns unpredictable
39     device names based on the order of discovery. Meaningful symlinks or network device
40     names provide a way to reliably identify devices based on their properties or
41     current configuration.</para>
42
43     <para>The udev daemon, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle>
44     <manvolnum>8</manvolnum></citerefentry>, receives device uevents directly from
45     the kernel whenever a device is added or removed from the system, or it changes its
46     state. When udev receives a device event, it matches its configured set of rules
47     against various device attributes to identify the device. Rules that match may
48     provide additional device information to be stored in the udev database or
49     to be used to create meaningful symlink names.</para>
50
51     <para>All device information udev processes is stored in the udev database and
52     sent out to possible event subscribers. Access to all stored data and the event
53     sources is provided by the library libudev.</para>
54   </refsect1>
55
56   <refsect1><title>Rules Files</title>
57       <para>The udev rules are read from the files located in the
58       system rules directory <filename>/usr/lib/udev/rules.d</filename>,
59       the volatile runtime directory <filename>/run/udev/rules.d</filename>
60       and the local administration directory <filename>/etc/udev/rules.d</filename>.
61       All rules files are collectively sorted and processed in lexical order,
62       regardless of the directories in which they live. However, files with
63       identical filenames replace each other. Files in <filename>/etc</filename>
64       have the highest priority, files in <filename>/run</filename> take precedence
65       over files with the same name in <filename>/usr/lib</filename>. This can be
66       used to override a system-supplied rules file with a local file if needed;
67       a symlink in <filename>/etc</filename> with the same name as a rules file in
68       <filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
69       disables the rules file entirely. Rule files must have the extension
70       <filename>.rules</filename>; other extensions are ignored.</para>
71
72       <para>Every line in the rules file contains at least one key-value pair.
73       Except for empty lines or lines beginning with <literal>#</literal>, which are ignored.
74       There are two kinds of keys: match and assignment.
75       If all match keys match against their values, the rule gets applied and the
76       assignment keys get the specified values assigned.</para>
77
78       <para>A matching rule may rename a network interface, add symlinks
79       pointing to the device node, or run a specified program as part of
80       the event handling.</para>
81
82       <para>A rule consists of a comma-separated list of one or more key-value pairs.
83       Each key has a distinct operation, depending on the used operator. Valid
84       operators are:</para>
85       <variablelist>
86         <varlistentry>
87           <term><literal>==</literal></term>
88           <listitem>
89             <para>Compare for equality.</para>
90           </listitem>
91         </varlistentry>
92
93         <varlistentry>
94           <term><literal>!=</literal></term>
95           <listitem>
96             <para>Compare for inequality.</para>
97           </listitem>
98         </varlistentry>
99
100         <varlistentry>
101           <term><literal>=</literal></term>
102           <listitem>
103             <para>Assign a value to a key. Keys that represent a list are reset
104             and only this single value is assigned.</para>
105           </listitem>
106         </varlistentry>
107
108         <varlistentry>
109           <term><literal>+=</literal></term>
110           <listitem>
111             <para>Add the value to a key that holds a list of entries.</para>
112           </listitem>
113         </varlistentry>
114
115         <varlistentry>
116           <term><literal>-=</literal></term>
117           <listitem>
118             <para>Remove the value from a key that holds a list of entries.</para>
119           </listitem>
120         </varlistentry>
121
122         <varlistentry>
123           <term><literal>:=</literal></term>
124           <listitem>
125             <para>Assign  a  value  to  a key finally; disallow any later changes.</para>
126           </listitem>
127         </varlistentry>
128       </variablelist>
129
130       <para>The following key names can be used to match against device properties.
131       Some of the keys also match against properties of the parent devices in sysfs,
132       not only the device that has generated the event. If multiple keys that match
133       a parent device are specified in a single rule, all these keys must match at
134       one and the same parent device.</para>
135       <variablelist class='udev-directives'>
136         <varlistentry>
137           <term><varname>ACTION</varname></term>
138           <listitem>
139             <para>Match the name of the event action.</para>
140           </listitem>
141         </varlistentry>
142
143         <varlistentry>
144           <term><varname>DEVPATH</varname></term>
145           <listitem>
146             <para>Match the devpath of the event device.</para>
147           </listitem>
148         </varlistentry>
149
150         <varlistentry>
151           <term><varname>KERNEL</varname></term>
152           <listitem>
153             <para>Match the name of the event device.</para>
154           </listitem>
155         </varlistentry>
156
157         <varlistentry>
158           <term><varname>NAME</varname></term>
159           <listitem>
160             <para>Match the name of a network interface. It can be used once the
161             NAME key has been set in one of the preceding rules.</para>
162           </listitem>
163         </varlistentry>
164
165         <varlistentry>
166           <term><varname>SYMLINK</varname></term>
167           <listitem>
168             <para>Match the name of a symlink targeting the node. It can
169             be used once a SYMLINK key has been set in one of the preceding
170             rules. There may be multiple symlinks; only one needs to match.
171             </para>
172           </listitem>
173         </varlistentry>
174
175         <varlistentry>
176           <term><varname>SUBSYSTEM</varname></term>
177           <listitem>
178             <para>Match the subsystem of the event device.</para>
179           </listitem>
180         </varlistentry>
181         <varlistentry>
182           <term><varname>DRIVER</varname></term>
183           <listitem>
184             <para>Match the driver name of the event device. Only set this key for devices
185             which are bound to a driver at the time the event is generated.</para>
186           </listitem>
187         </varlistentry>
188         <varlistentry>
189           <term><varname>ATTR{<replaceable>filename</replaceable>}</varname></term>
190           <listitem>
191             <para>Match sysfs attribute values of the event device. Trailing
192             whitespace in the attribute values is ignored unless the specified match
193             value itself contains trailing whitespace.
194             </para>
195           </listitem>
196         </varlistentry>
197
198         <varlistentry>
199           <term><varname>KERNELS</varname></term>
200           <listitem>
201             <para>Search the devpath upwards for a matching device name.</para>
202           </listitem>
203         </varlistentry>
204
205         <varlistentry>
206           <term><varname>SUBSYSTEMS</varname></term>
207           <listitem>
208             <para>Search the devpath upwards for a matching device subsystem name.</para>
209           </listitem>
210         </varlistentry>
211
212         <varlistentry>
213           <term><varname>DRIVERS</varname></term>
214           <listitem>
215             <para>Search the devpath upwards for a matching device driver name.</para>
216           </listitem>
217         </varlistentry>
218
219         <varlistentry>
220           <term><varname>ATTRS{<replaceable>filename</replaceable>}</varname></term>
221           <listitem>
222             <para>Search the devpath upwards for a device with matching sysfs attribute values.
223             If multiple <varname>ATTRS</varname> matches are specified, all of them
224             must match on the same device. Trailing whitespace in the attribute values is ignored
225             unless the specified match value itself contains trailing whitespace.</para>
226           </listitem>
227         </varlistentry>
228
229         <varlistentry>
230           <term><varname>TAGS</varname></term>
231           <listitem>
232             <para>Search the devpath upwards for a device with matching tag.</para>
233           </listitem>
234         </varlistentry>
235
236         <varlistentry>
237           <term><varname>ENV{<replaceable>key</replaceable>}</varname></term>
238           <listitem>
239             <para>Match against a device property value.</para>
240           </listitem>
241         </varlistentry>
242
243         <varlistentry>
244           <term><varname>TAG</varname></term>
245           <listitem>
246             <para>Match against a device tag.</para>
247           </listitem>
248         </varlistentry>
249
250         <varlistentry>
251           <term><varname>TEST{<replaceable>octal mode mask</replaceable>}</varname></term>
252           <listitem>
253             <para>Test the existence of a file. An octal mode mask can be specified
254             if needed.</para>
255           </listitem>
256         </varlistentry>
257
258         <varlistentry>
259           <term><varname>PROGRAM</varname></term>
260           <listitem>
261             <para>Execute a program to determine whether there
262             is a match; the key is true if the program returns
263             successfully. The device properties are made available to the
264             executed program in the environment. The program's standard output
265             is available in the <varname>RESULT</varname> key.</para>
266             <para>This can only be used for very short-running foreground tasks. For details,
267             see <varname>RUN</varname>.</para>
268           </listitem>
269         </varlistentry>
270
271         <varlistentry>
272           <term><varname>RESULT</varname></term>
273           <listitem>
274             <para>Match the returned string of the last <varname>PROGRAM</varname> call.
275             This key can be used in the same or in any later rule after a
276             <varname>PROGRAM</varname> call.</para>
277           </listitem>
278         </varlistentry>
279       </variablelist>
280
281       <para>Most of the fields support shell glob pattern matching and
282       alternate patterns. The following special characters are supported:</para>
283       <variablelist>
284         <varlistentry>
285           <term><literal>*</literal></term>
286           <listitem>
287             <para>Matches zero or more characters.</para>
288           </listitem>
289         </varlistentry>
290         <varlistentry>
291           <term><literal>?</literal></term>
292           <listitem>
293             <para>Matches any single character.</para>
294           </listitem>
295         </varlistentry>
296         <varlistentry>
297           <term><literal>[]</literal></term>
298           <listitem>
299             <para>Matches any single character specified within the brackets. For
300             example, the pattern string <literal>tty[SR]</literal>
301             would match either <literal>ttyS</literal> or <literal>ttyR</literal>.
302             Ranges are also supported via the <literal>-</literal> character.
303             For example, to match on the range of all digits, the pattern
304             <literal>[0-9]</literal> could be used. If the first character
305             following the <literal>[</literal> is a <literal>!</literal>,
306             any characters not enclosed are matched.</para>
307           </listitem>
308         </varlistentry>
309         <varlistentry>
310           <term><literal>|</literal></term>
311           <listitem>
312             <para>Separates alternative patterns. For example, the pattern string
313             <literal>abc|x*</literal> would match either <literal>abc</literal>
314             or <literal>x*</literal>.</para>
315           </listitem>
316         </varlistentry>
317       </variablelist>
318
319       <para>The following keys can get values assigned:</para>
320       <variablelist class='udev-directives'>
321         <varlistentry>
322           <term><varname>NAME</varname></term>
323           <listitem>
324             <para>The name to use for a network interface. See
325             <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
326             for a higher-level mechanism for setting the interface name.
327             The name of a device node cannot be changed by udev, only additional
328             symlinks can be created.</para>
329           </listitem>
330         </varlistentry>
331
332         <varlistentry>
333           <term><varname>SYMLINK</varname></term>
334           <listitem>
335             <para>The name of a symlink targeting the node. Every matching rule adds
336             this value to the list of symlinks to be created.</para>
337             <para>The set of characters to name a symlink is limited. Allowed
338             characters are <literal>0-9A-Za-z#+-.:=@_/</literal>, valid UTF-8 character
339             sequences, and <literal>\x00</literal> hex encoding. All other
340             characters are replaced by a <literal>_</literal> character.</para>
341             <para>Multiple symlinks may be specified by separating the names by the
342             space character. In case multiple devices claim the same name, the link
343             always points to the device with the highest link_priority. If the current
344             device goes away, the links are re-evaluated and the device with the
345             next highest link_priority becomes the owner of the link. If no
346             link_priority is specified, the order of the devices (and which one of
347             them owns the link) is undefined.</para>
348             <para>Symlink names must never conflict with the kernel's default device
349             node names, as that would result in unpredictable behavior.
350             </para>
351           </listitem>
352         </varlistentry>
353
354         <varlistentry>
355           <term><varname>OWNER</varname>, <varname>GROUP</varname>, <varname>MODE</varname></term>
356           <listitem>
357             <para>The permissions for the device node. Every specified value overrides
358             the compiled-in default value.</para>
359           </listitem>
360         </varlistentry>
361
362         <varlistentry>
363           <term><varname>SECLABEL{<replaceable>module</replaceable>}</varname></term>
364           <listitem>
365             <para>Applies the specified Linux Security Module label to the device node.</para>
366           </listitem>
367         </varlistentry>
368
369         <varlistentry>
370           <term><varname>ATTR{<replaceable>key</replaceable>}</varname></term>
371           <listitem>
372             <para>The value that should be written to a sysfs attribute of the
373             event device.</para>
374           </listitem>
375         </varlistentry>
376
377         <varlistentry>
378           <term><varname>ENV{<replaceable>key</replaceable>}</varname></term>
379           <listitem>
380             <para>Set a device property value. Property names with a leading <literal>.</literal>
381             are neither stored in the database nor exported to events or
382             external tools (run by, for example, the <varname>PROGRAM</varname>
383             match key).</para>
384           </listitem>
385         </varlistentry>
386
387         <varlistentry>
388           <term><varname>TAG</varname></term>
389           <listitem>
390             <para>Attach a tag to a device. This is used to filter events for users
391             of libudev's monitor functionality, or to enumerate a group of tagged
392             devices. The implementation can only work efficiently if only a few
393             tags are attached to a device. It is only meant to be used in
394             contexts with specific device filter requirements, and not as a
395             general-purpose flag. Excessive use might result in inefficient event
396             handling.</para>
397           </listitem>
398         </varlistentry>
399
400         <varlistentry>
401           <term><varname>RUN{<replaceable>type</replaceable>}</varname></term>
402           <listitem>
403             <para>Add a program to the list of programs to be executed after
404             processing all the rules for a specific event, depending on
405             <literal>type</literal>:</para>
406             <variablelist>
407               <varlistentry>
408                 <term><literal>program</literal></term>
409                 <listitem>
410                   <para>Execute an external program specified as the assigned
411                   value. If no absolute path is given, the program is expected
412                   to live in <filename>/usr/lib/udev</filename>; otherwise, the
413                   absolute path must be specified.</para>
414                   <para>This is the default if no <replaceable>type</replaceable>
415                   is specified.</para>
416                 </listitem>
417               </varlistentry>
418               <varlistentry>
419                 <term><literal>builtin</literal></term>
420                 <listitem>
421                   <para>As <varname>program</varname>, but use one of the
422                   built-in programs rather than an external one.</para>
423                 </listitem>
424               </varlistentry>
425             </variablelist>
426             <para>The program name and following arguments are separated by spaces.
427             Single quotes can be used to specify arguments with spaces.</para>
428             <para>This can only be used for very short-running foreground tasks. Running an
429             event process for a long period of time may block all further events for
430             this or a dependent device.</para>
431             <para>Starting daemons or other long-running processes is not appropriate
432             for udev; the forked processes, detached or not, will be unconditionally
433             killed after the event handling has finished.</para>
434           </listitem>
435         </varlistentry>
436
437         <varlistentry>
438           <term><varname>LABEL</varname></term>
439           <listitem>
440             <para>A named label to which a <varname>GOTO</varname> may jump.</para>
441           </listitem>
442         </varlistentry>
443
444         <varlistentry>
445           <term><varname>GOTO</varname></term>
446           <listitem>
447             <para>Jumps to the next <varname>LABEL</varname> with a matching name.</para>
448           </listitem>
449         </varlistentry>
450
451         <varlistentry>
452           <term><varname>IMPORT{<replaceable>type</replaceable>}</varname></term>
453           <listitem>
454             <para>Import a set of variables as device properties,
455             depending on <literal>type</literal>:</para>
456             <variablelist>
457               <varlistentry>
458                 <term><literal>program</literal></term>
459                 <listitem>
460                   <para>Execute an external program specified as the assigned value and
461                   import its output, which must be in environment key
462                   format. Path specification, command/argument separation,
463                   and quoting work like in <varname>RUN</varname>.</para>
464                 </listitem>
465               </varlistentry>
466               <varlistentry>
467                 <term><literal>builtin</literal></term>
468                 <listitem>
469                   <para>Similar to <literal>program</literal>, but use one of the
470                   built-in programs rather than an external one.</para>
471                 </listitem>
472               </varlistentry>
473              <varlistentry>
474                 <term><literal>file</literal></term>
475                 <listitem>
476                   <para>Import a text file specified as the assigned value, the content
477                   of which must be in environment key format.</para>
478                 </listitem>
479               </varlistentry>
480               <varlistentry>
481                 <term><literal>db</literal></term>
482                 <listitem>
483                   <para>Import a single property specified as the assigned value from the
484                   current device database. This works only if the database is already populated
485                   by an earlier event.</para>
486                 </listitem>
487               </varlistentry>
488               <varlistentry>
489                 <term><literal>cmdline</literal></term>
490                 <listitem>
491                   <para>Import a single property from the kernel command line. For simple flags
492                   the value of the property is set to <literal>1</literal>.</para>
493                 </listitem>
494               </varlistentry>
495               <varlistentry>
496                 <term><literal>parent</literal></term>
497                 <listitem>
498                   <para>Import the stored keys from the parent device by reading
499                   the database entry of the parent device. The value assigned to
500                   <option>IMPORT{parent}</option> is used as a filter of key names
501                   to import (with the same shell glob pattern matching used for
502                   comparisons).</para>
503                 </listitem>
504               </varlistentry>
505             </variablelist>
506             <para>This can only be used for very short-running foreground tasks. For details
507             see <option>RUN</option>.</para>
508           </listitem>
509         </varlistentry>
510
511         <varlistentry>
512           <term><varname>WAIT_FOR</varname></term>
513           <listitem>
514             <para>Wait for a file to become available or until a timeout of
515             10 seconds expires. The path is relative to the sysfs device;
516             if no path is specified, this waits for an attribute to appear.</para>
517           </listitem>
518         </varlistentry>
519
520         <varlistentry>
521           <term><varname>OPTIONS</varname></term>
522           <listitem>
523             <para>Rule and device options:</para>
524             <variablelist class='udev-directives'>
525               <varlistentry>
526                 <term><option>link_priority=<replaceable>value</replaceable></option></term>
527                 <listitem>
528                   <para>Specify the priority of the created symlinks. Devices with higher
529                   priorities overwrite existing symlinks of other devices. The default is 0.</para>
530                 </listitem>
531               </varlistentry>
532               <varlistentry>
533                 <term><option>string_escape=<replaceable>none|replace</replaceable></option></term>
534                 <listitem>
535                   <para>Usually control and other possibly unsafe characters are replaced
536                   in strings used for device naming. The mode of replacement can be specified
537                   with this option.</para>
538                 </listitem>
539               </varlistentry>
540               <varlistentry>
541                 <term><option>static_node=</option></term>
542                 <listitem>
543                   <para>Apply the permissions specified in this rule to the
544                   static device node with the specified name. Also, for every
545                   tag specified in this rule, create a symlink
546                   in the directory
547                   <filename>/run/udev/static_node-tags/<replaceable>tag</replaceable></filename>
548                   pointing at the static device node with the specified name.
549                   Static device node creation is performed by systemd-tmpfiles
550                   before systemd-udevd is started. The static nodes might not
551                   have a corresponding kernel device; they are used to trigger
552                   automatic kernel module loading when they are accessed.</para>
553                 </listitem>
554               </varlistentry>
555               <varlistentry>
556                 <term><option>watch</option></term>
557                 <listitem>
558                   <para>Watch the device node with inotify; when the node is
559                   closed after being opened for writing, a change uevent is
560                   synthesized.</para>
561                 </listitem>
562               </varlistentry>
563               <varlistentry>
564                 <term><option>nowatch</option></term>
565                 <listitem>
566                   <para>Disable the watching of a device node with inotify.</para>
567                 </listitem>
568               </varlistentry>
569             </variablelist>
570           </listitem>
571         </varlistentry>
572       </variablelist>
573
574       <para>The <varname>NAME</varname>, <varname>SYMLINK</varname>,
575       <varname>PROGRAM</varname>, <varname>OWNER</varname>,
576       <varname>GROUP</varname>, <varname>MODE</varname>, and
577       <varname>RUN</varname> fields support simple string substitutions.
578       The <varname>RUN</varname> substitutions are performed after all rules
579       have been processed, right before the program is executed, allowing for
580       the use of device properties set by earlier matching rules. For all other
581       fields, substitutions are performed while the individual rule is being
582       processed. The available substitutions are:</para>
583       <variablelist class='udev-directives'>
584         <varlistentry>
585           <term><option>$kernel</option>, <option>%k</option></term>
586           <listitem>
587             <para>The kernel name for this device.</para>
588           </listitem>
589         </varlistentry>
590
591         <varlistentry>
592           <term><option>$number</option>, <option>%n</option></term>
593           <listitem>
594             <para>The kernel number for this device. For example,
595               <literal>sda3</literal> has kernel number <literal>3</literal>.
596             </para>
597           </listitem>
598         </varlistentry>
599
600         <varlistentry>
601           <term><option>$devpath</option>, <option>%p</option></term>
602           <listitem>
603             <para>The devpath of the device.</para>
604           </listitem>
605         </varlistentry>
606
607         <varlistentry>
608           <term><option>$id</option>, <option>%b</option></term>
609           <listitem>
610             <para>The name of the device matched while searching the devpath
611               upwards for <option>SUBSYSTEMS</option>, <option>KERNELS</option>,
612               <option>DRIVERS</option>, and <option>ATTRS</option>.
613             </para>
614           </listitem>
615         </varlistentry>
616
617         <varlistentry>
618           <term><option>$driver</option></term>
619           <listitem>
620             <para>The driver name of the device matched while searching the
621               devpath upwards for <option>SUBSYSTEMS</option>,
622               <option>KERNELS</option>, <option>DRIVERS</option>, and
623               <option>ATTRS</option>.
624             </para>
625           </listitem>
626         </varlistentry>
627
628         <varlistentry>
629           <term><option>$attr{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
630           <listitem>
631             <para>The value of a sysfs attribute found at the device where
632               all keys of the rule have matched. If the matching device does not
633               have such an attribute, and a previous <option>KERNELS</option>,
634               <option>SUBSYSTEMS</option>, <option>DRIVERS</option>, or
635               <option>ATTRS</option> test selected a parent device, then the
636               attribute from that parent device is used.
637             </para>
638             <para>If the attribute is a symlink, the last element of the
639               symlink target is returned as the value.
640             </para>
641           </listitem>
642         </varlistentry>
643
644         <varlistentry>
645           <term><option>$env{<replaceable>key</replaceable>}</option>, <option>%E{<replaceable>key</replaceable>}</option></term>
646           <listitem>
647             <para>A device property value.</para>
648           </listitem>
649         </varlistentry>
650
651         <varlistentry>
652           <term><option>$major</option>, <option>%M</option></term>
653           <listitem>
654             <para>The kernel major number for the device.</para>
655           </listitem>
656         </varlistentry>
657
658         <varlistentry>
659           <term><option>$minor</option>, <option>%m</option></term>
660           <listitem>
661             <para>The kernel minor number for the device.</para>
662           </listitem>
663         </varlistentry>
664
665         <varlistentry>
666           <term><option>$result</option>, <option>%c</option></term>
667           <listitem>
668             <para>The string returned by the external program requested with
669             <varname>PROGRAM</varname>.
670             A single part of the string, separated by a space character, may be selected
671             by specifying the part number as an attribute: <literal>%c{N}</literal>.
672             If the number is followed by the <literal>+</literal> character, this part plus all remaining parts
673             of the result string are substituted: <literal>%c{N+}</literal>.</para>
674           </listitem>
675         </varlistentry>
676
677         <varlistentry>
678           <term><option>$parent</option>, <option>%P</option></term>
679           <listitem>
680             <para>The node name of the parent device.</para>
681           </listitem>
682         </varlistentry>
683
684         <varlistentry>
685           <term><option>$name</option></term>
686           <listitem>
687             <para>The current name of the device. If not changed by a rule, it is the
688             name of the kernel device.</para>
689           </listitem>
690         </varlistentry>
691
692         <varlistentry>
693           <term><option>$links</option></term>
694           <listitem>
695             <para>A space-separated list of the current symlinks. The value is
696             only set during a remove event or if an earlier rule assigned a value.</para>
697           </listitem>
698         </varlistentry>
699
700         <varlistentry>
701           <term><option>$root</option>, <option>%r</option></term>
702           <listitem>
703             <para>The udev_root value.</para>
704           </listitem>
705         </varlistentry>
706
707         <varlistentry>
708           <term><option>$sys</option>, <option>%S</option></term>
709           <listitem>
710             <para>The sysfs mount point.</para>
711           </listitem>
712         </varlistentry>
713
714         <varlistentry>
715           <term><option>$devnode</option>, <option>%N</option></term>
716           <listitem>
717             <para>The name of the device node.</para>
718           </listitem>
719         </varlistentry>
720
721         <varlistentry>
722           <term><option>%%</option></term>
723           <listitem>
724           <para>The <literal>%</literal> character itself.</para>
725           </listitem>
726         </varlistentry>
727
728         <varlistentry>
729           <term><option>$$</option></term>
730           <listitem>
731           <para>The <literal>$</literal> character itself.</para>
732           </listitem>
733         </varlistentry>
734       </variablelist>
735   </refsect1>
736
737   <refsect1>
738     <title>See Also</title>
739     <para>
740       <citerefentry>
741         <refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum>
742       </citerefentry>,
743       <citerefentry>
744         <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum>
745       </citerefentry>,
746       <citerefentry>
747         <refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum>
748       </citerefentry>
749     </para>
750   </refsect1>
751 </refentry>