]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: provide way to toggle udev device enumeration off
authorRay Strode <rstrode@redhat.com>
Tue, 10 Dec 2013 02:07:16 +0000 (21:07 -0500)
committerRay Strode <rstrode@redhat.com>
Tue, 10 Dec 2013 06:01:34 +0000 (01:01 -0500)
We don't want to use udev for device enumeration if:

1) DISPLAY is set (since we're going to use the X11 renderer)
2) if it's disabled explicitly on the kernel command line

This commit adds support for those two things.

src/main.c

index b1dee5878567793be8bacbd3b8291cc0c5688575..50062951f92e6669cd6c8e0c052cba9c9dc8c4e5 100644 (file)
@@ -2200,6 +2200,10 @@ main (int    argc,
   if (command_line_has_argument (state.kernel_command_line, "plymouth.ignore-serial-consoles"))
     device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_SERIAL_CONSOLES;
 
+  if (command_line_has_argument (state.kernel_command_line, "plymouth.ignore-udev") ||
+      (getenv ("DISPLAY") != NULL))
+    device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV;
+
   load_devices (&state, device_manager_flags);
 
   ply_trace ("entering event loop");