[systemd-commits] 3 commits - man/systemd-udevd.service.xml man/udev.xml rules/80-drivers.rules rules/80-net-name-slot.rules TODO

Tom Gundersen tomegun at kemper.freedesktop.org
Mon Mar 18 10:25:35 PDT 2013


 TODO                          |    2 --
 man/systemd-udevd.service.xml |    8 ++++++++
 man/udev.xml                  |    4 ++--
 rules/80-drivers.rules        |   12 ++++++------
 rules/80-net-name-slot.rules  |    5 +++++
 5 files changed, 21 insertions(+), 10 deletions(-)

New commits:
commit 08cbc57e87b19277568c6f7d038c460d9063775f
Author: Tom Gundersen <teg at jklm.no>
Date:   Mon Mar 18 18:09:46 2013 +0100

    man: udev - clarify when RUN is executed
    
    Unlike IMPORT and PROGRAM, RUN is not executed inline, but after all the rules of the given event have been processed.

diff --git a/man/udev.xml b/man/udev.xml
index eab525f..e253a06 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -374,8 +374,8 @@
         <varlistentry>
           <term><option>RUN{<replaceable>type</replaceable>}</option></term>
           <listitem>
-            <para>Add a program to the list of programs to be executed for a specific
-            device, depending on <literal>type</literal>:</para>
+            <para>Add a program to the list of programs to be executed after processing all the
+            rules for a specific event, depending on <literal>type</literal>:</para>
             <variablelist>
               <varlistentry>
                 <term><literal>program</literal></term>

commit f4fbb8be14051c0ea920cebcb011c965d95a7b86
Author: Tom Gundersen <teg at jklm.no>
Date:   Sat Mar 16 17:26:47 2013 +0900

    udev: builtin - use RUN rather than IMPORT for loading modules
    
    The 'kmod' builtin, like the 'firmware' and 'uaccess' builtins, does not set
    any variables, so don't use IMPORT.
    
    Notice that this changes the behaviour slightly: the processing of subsequent
    rules for the event that loads a module will no longer wait for the module
    loading to finish. This is not expected to cause any problems, but we should
    keep an eye on it.

diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
index a0615cc..50523e4 100644
--- a/rules/80-drivers.rules
+++ b/rules/80-drivers.rules
@@ -2,12 +2,12 @@
 
 ACTION=="remove", GOTO="drivers_end"
 
-DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", IMPORT{builtin}="kmod load tifm_sd"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", IMPORT{builtin}="kmod load tifm_ms"
-SUBSYSTEM=="memstick", IMPORT{builtin}="kmod load ms_block mspro_block"
-SUBSYSTEM=="i2o", IMPORT{builtin}="kmod load i2o_block"
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
+SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block"
 SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev"
-KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", IMPORT{builtin}="kmod load sm_ftl"
+KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl"
 
 LABEL="drivers_end"

commit 0cf2d0d023389957f57175c9cfb6aba56c0df343
Author: Tom Gundersen <teg at jklm.no>
Date:   Sun Mar 17 13:23:33 2013 +0900

    udev: net-name-slot - disable by kernel command line switch
    
    The properties will still be set in the udev database, but they will not be used
    for setting the interface names. As for the other kernel commandline switches,
    we allow it to be prefixed by 'rd.' to only apply in the initrd.

diff --git a/TODO b/TODO
index fcc3471..c73e8dc 100644
--- a/TODO
+++ b/TODO
@@ -28,8 +28,6 @@ Fedora 19:
 * cgroup attrs:
   - update dbus interface docs in wiki
 
-* kernel cmdline switch to turn off predictable network interface names
-
 * journal is not closed properly at shutdown when run in a container?
 
 * localed:
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index 35e2543..18734ee 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -154,6 +154,14 @@
           non-working kernel modules.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><varname>net.predictable-names=</varname></term>
+        <term><varname>rd.net.predictable-names=</varname></term>
+        <listitem>
+          <para>Rename network interfaces to give them predictable names
+          when possible. Defaults to 1.</para>
+        </listitem>
+      </varlistentry>
     </variablelist>
  </refsect1>
 
diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
index 2834e82..e83eb3f 100644
--- a/rules/80-net-name-slot.rules
+++ b/rules/80-net-name-slot.rules
@@ -4,6 +4,11 @@ ACTION=="remove", GOTO="net_name_slot_end"
 SUBSYSTEM!="net", GOTO="net_name_slot_end"
 NAME!="", GOTO="net_name_slot_end"
 
+IMPORT{cmdline}="net.predictable-names"
+ENV{net.predictable-names}=="0", GOTO="net_name_slot_end"
+IMPORT{cmdline}="rd.net.predictable-names"
+ENV{rd.net.predictable-names}=="0", TEST=="/etc/initrd-release", GOTO="net_name_slot_end"
+
 NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
 NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
 NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"



More information about the systemd-commits mailing list