Work around "udev >=208-6 without systemd" bug with loopback device, causing serious...
authorMichael Prokop <mika@grml.org>
Tue, 28 Oct 2014 23:44:02 +0000 (00:44 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 28 Oct 2014 23:48:42 +0000 (00:48 +0100)
Without the loopback device properly set up when the udev
init script gets executed we have a boot delay of XX seconds.
This is a show stopper for us and until
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754987
has been resolved we need a workaround for that.

Thanks: Evgeni Golov, Marco d'Itri, Christian Hofstaedtler and Ulrich Dangel for debugging assistance

debian/grml-udev-config.grml-udev.init

index 8d106e5..8818e14 100644 (file)
@@ -81,6 +81,13 @@ case "$1" in
           printf 'Warning: /etc/grml/autoconfig.functions could not be read.\n'>&2
         fi
 
+        # ugly workaround to get udev >=208-6 without systemd working
+        # without long delay during udev startup :( more details at
+        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754987
+        if cat /sys/class/net/lo/operstate 2>/dev/null | grep -q 'down' ; then
+          ip link set dev lo up
+        fi
+
         # support bootoption noudev and inform user how to skip
         # execution of udev (being bootoption noudev)
         if ! grep -q noudev /proc/cmdline ; then