chiark / gitweb /
udev: net_setup - allow matching on OriginalName=
[elogind.git] / man / systemd.link.xml
index f73182aca9da124a80ecae6c63586038d5be2ee1..0eb395089df7c558f65848f0bf5dccc6a2a34f22 100644 (file)
                 <literal>[Link]</literal> section specifying how the device should be
                 configured. The first (in lexical order) of the link files that matches
                 a given device is applied.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>[Match] Section Options</title>
 
                 <para>A link file is said to match a device if each of the entries in the
                 <literal>[Match]</literal> section matches, or if the section is empty.
                                         <para>The hardware address.</para>
                                 </listitem>
                         </varlistentry>
+                        <varlistentry>
+                                <term><varname>OriginalName=</varname></term>
+                                <listitem>
+                                        <para>The device name, as exposed by the udev
+                                        property "INTERFACE". May contain shell style
+                                        globs. This can not be used to match on names
+                                        that have already been changed from userspace.
+                                        Caution is adviced when matching on
+                                        kernel-assigned names, as they are known to
+                                        be unstable between reboots.</para>
+                                </listitem>
+                        </varlistentry>
                         <varlistentry>
                                 <term><varname>Path=</varname></term>
                                 <listitem>
-                                <para>The persistent path, as exposed by the
-                                udev property <literal>ID_PATH</literal>. May
-                                contain shell style globs.</para>
-                        </listitem>
+                                        <para>The persistent path, as exposed by the
+                                        udev property <literal>ID_PATH</literal>. May
+                                        contain shell style globs.</para>
+                                </listitem>
                         </varlistentry>
                         <varlistentry>
                                 <term><varname>Driver=</varname></term>
                         </varlistentry>
                 </variablelist>
 
+        </refsect1>
+
+        <refsect1>
+                <title>[Link] Section Options</title>
+
                 <para>The <literal>[Link]</literal> section accepts the following
                 keys:</para>
 
                                         be set. <literal>NamePolicy</literal> may be
                                         disabled by specifying
                                         <literal>net.ifnames=0</literal> on the kernel
-                                        commandline. Each of the policies may fail, and
+                                        command line. Each of the policies may fail, and
                                         the first successful one is used. The name is
                                         not set directly, but is exported to udev as
                                         the property <literal>ID_NET_NAME</literal>,
                                         which is, by default, used by a udev rule to set
-                                        <literal>NAME</literal>. The available policies
-                                        are:</para>
+                                        <literal>NAME</literal>. If the name has already
+                                        been set by userspace, no renaming is performed.
+                                        The available policies are:</para>
 
                                         <variablelist>
+                                                <varlistentry>
+                                                        <term><literal>kernel</literal></term>
+                                                        <listitem>
+                                                                <para>If the kernel claims that the name it
+                                                                has set for a device is predictable, then
+                                                                no renaming is performed.
+                                                                </para>
+                                                        </listitem>
+                                                </varlistentry>
                                                 <varlistentry>
                                                         <term><literal>database</literal></term>
                                                         <listitem>