Author: eelco
Date: 2010-06-07 12:39:50 +0000 (Mon, 07 Jun 2010)
New Revision: 22167

You can view the changes in this commit at:
   https://svn.nixos.org/viewvc/nix?rev=22167&view=rev

Modified:
   nixos/branches/boot-order/modules/services/hardware/udev.nix
   nixos/branches/boot-order/modules/services/x11/xserver.nix

Log:
* Run udevtrigger in a separate job.  This speeds up booting because
  it allows the `mountall' task to start mounting filesystems as soon
  as udev is running and devices become available (i.e. it doesn't
  have to wait for all devices).  This means that some jobs should
  depend on "stopped udevtrigger" instead of "started udev".


Changes:

Modified: nixos/branches/boot-order/modules/services/hardware/udev.nix
===================================================================
--- nixos/branches/boot-order/modules/services/hardware/udev.nix        
2010-06-07 12:16:59 UTC (rev 22166)
+++ nixos/branches/boot-order/modules/services/hardware/udev.nix        
2010-06-07 12:39:50 UTC (rev 22167)
@@ -185,8 +185,14 @@
         daemonType = "fork";
 
         exec = "${udev}/sbin/udevd --daemon";
+      };
 
-        postStart =
+    jobs.udevtrigger =
+      { startOn = "started udev";
+
+        task = true;
+
+        script =
           ''
             # Let udev create device nodes for all modules that have already
             # been loaded into the kernel (or for which support is built into
@@ -200,9 +206,8 @@
 
             initctl emit -n new-devices
           '';
-        
       };
-
+      
   };
 
 }

Modified: nixos/branches/boot-order/modules/services/x11/xserver.nix
===================================================================
--- nixos/branches/boot-order/modules/services/x11/xserver.nix  2010-06-07 
12:16:59 UTC (rev 22166)
+++ nixos/branches/boot-order/modules/services/x11/xserver.nix  2010-06-07 
12:39:50 UTC (rev 22167)
@@ -408,7 +408,7 @@
       optional (elem "virtualbox" driverNames) 
kernelPackages.virtualboxGuestAdditions;
 
     jobs.xserver =
-      { startOn = if cfg.autorun then "started udev and started hal" else "";
+      { startOn = if cfg.autorun then "filesystem and stopped udevtrigger and 
started hal" else "";
  
         environment =
           { FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to