Work around "udev >=208-6 without systemd" bug with loopback device, causing serious...
[grml-udev-config.git] / debian / grml-udev-config.grml-udev.init
index 56b4a5a..8818e14 100644 (file)
@@ -81,15 +81,22 @@ 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
-           check_for_non_interactive && \
-              log_warning_msg "If your system hangs now skip execution of udev via bootoption noudev"
+          check_for_non_interactive && \
+            log_action_msg "If your system hangs now, disable udev with bootoption \"noudev\"" && echo
         else
            # - allow execution of initscript through FORCE=1 when booting with noudev
            if [ -z "$FORCE" ] ; then
-              log_failure_msg "Bootoption noudev found. Skipping execution of udev init script."
+              log_failure_msg "Bootoption \"noudev\" found. Skipping execution of udev init script."
               if ! check_for_non_interactive ; then
                  printf "\nIt has been detected that the udev init script\n"
                  printf "has been run from an interactive shell.\n"