systemd.device.xml revision 419173e60a05424008fcd312f6df4b59b2ce8e62
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend This file is part of systemd.
b4a00883f358625923365ca1560c96edec172a52sf Copyright 2010 Lennart Poettering
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend systemd is free software; you can redistribute it and/or modify it
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend under the terms of the GNU Lesser General Public License as published by
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the Free Software Foundation; either version 2.1 of the License, or
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend (at your option) any later version.
909ce17e2bd0faef7b1c294f2307f009793fd493nd systemd is distributed in the hope that it will be useful, but
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend WITHOUT ANY WARRANTY; without even the implied warranty of
0ce5630695a7aa568811a9dd0aceedd685f040dend MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a29610af88e278144045bfa1bc63b4a1a4b5ff14trawick Lesser General Public License for more details.
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholes You should have received a copy of the GNU Lesser General Public License
6fe26506780e73be2a412d758af77fafdf03291and along with systemd; If not, see <http://www.gnu.org/licenses/>.
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend <refentryinfo>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend <authorgroup>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend </authorgroup>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend </refentryinfo>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend </refmeta>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend <refnamediv>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend </refnamediv>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend <refsynopsisdiv>
03a4ff9ac4c9b8009249010e7c53bb86ff05915and <para><filename><replaceable>device</replaceable>.device</filename></para>
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin </refsynopsisdiv>
7d15331eeb5429d7148d13d6fd914a641bf1c000pquerna <para>A unit configuration file whose name ends in
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend a device unit as exposed in the
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend sysfs/<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
2704de98885368683621b01c8f8f4e4b01557611takashi device tree.</para>
2704de98885368683621b01c8f8f4e4b01557611takashi <para>This unit type has no specific options. See
1e367a83311e5243e04d68857d007d04765a48f9chrisd <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend for the common options of all unit configuration
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend files. The common configuration items are configured
fb51a6b789d85113d0976148685b0063c294220drbowen since no device-specific options may be
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend configured.</para>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend <para>systemd will dynamically create device units for
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend all kernel devices that are marked with the "systemd"
27d778df0b517e1578f907d2e51eb961cd8ee5fbjim udev tag (by default all block and network devices,
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend and a few others). This may be used to define
6b0fe1f447ba35827cd5cf1d2a703bd8517f33ffmturk dependencies between devices and other units. To tag a
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend the udev rules file, see
438b4817913a5ff55d9cad4c7ddf133330b4466ejim <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
e5ce3ac0e9b720c0fa23782e29168a0810697fdetakashi for details.</para>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend <para>Device units are named after the
0a69d9bb491d9810892a9949c01403a1de3c7ac2nd the device <filename noindex='true'>/dev/sda5</filename> is exposed
ebdfe3e677aaa92fe2df702295eac81a97a4610frbowen in systemd as <filename>dev-sda5.device</filename>. For
68c4447ba8e057cf38cbbec918e0549b817f20b4minfrin details about the escaping logic used to convert a
5f4e50966b2b9b58436a1651cbe588d1b595657ewrowe file system path to a unit name see
5332c9934b1c0136e9cd4815fe7d70b79d83fddcsf <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend </refsect1>
f195a136dcd90148b116fdae8ce95b41ba92b87eminfrin <para>The settings of device units may either be
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend configured via unit files, or directly from the udev
1de1266f0ea387d6373be8415745dfd2ab876341jim database (which is recommended). The following udev device
1de1266f0ea387d6373be8415745dfd2ab876341jim properties are understood by systemd:</para>
856894d144a15ef1671032a17965bd00b430d311minfrin <varlistentry>
0ce5630695a7aa568811a9dd0aceedd685f040dend the device unit to all listed units. This
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend may be used to activate arbitrary
10eed2803538d660048f6e733602e82a75ef6885noodl units when a specific device becomes
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend available. Note that this and the
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend other tags are not taken into account
4db28ee269aa06f7c6232e11cd01f58c3349af23noodl unless the device is tagged with the
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend the udev database, because otherwise
03c25fb6f628ac81f2ecb637d1e7502dcee783f3nd the device is not exposed as systemd
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend unit (see above). Note that systemd
4126704c4950bfd46d32ad54e3b106ac6d868a73sf will only act on
7fa75a06a4fee19e995c069ee00310455d1452e1pquerna when a device first becomes active, it
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend will not act on them if they are added
316f02e3836836c82e19019ff23f90a7ebc65289nilgun to devices that are already
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend active. Use
0ce5630695a7aa568811a9dd0aceedd685f040dend below) to influence on which udev
f73f2c2fae0ded6c8273c28d025ba8aa8136a0fend event to trigger the device
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>