From 793297861726a6c7e589d3ad5d2ab063baaec987 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 2 Oct 2012 10:26:55 -0400 Subject: [PATCH] Fix Upstart compatibility jobs that depend on "stopped udevtrigger" It's not enough to say "after udev-settle.service" since udev-settle.service is not wanted/required anywhere - we need to say "wants udev-settle.service" as well. This should fix problems with ALSA and X11 initialisation that people have been seeing. --- modules/system/upstart/upstart.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix index 57a532837f3..4fbf683c440 100644 --- a/modules/system/upstart/upstart.nix +++ b/modules/system/upstart/upstart.nix @@ -54,7 +54,7 @@ let ''; in { - inherit (job) description requires wants before partOf environment path restartIfChanged unitConfig; + inherit (job) description wants before partOf environment path restartIfChanged unitConfig; after = (if job.startOn == "stopped udevtrigger" then [ "systemd-udev-settle.service" ] else @@ -66,6 +66,10 @@ let builtins.trace "Warning: job ‘${job.name}’ has unknown startOn value ‘${job.startOn}’." [] ) ++ job.after; + requires = + (if job.startOn == "stopped udevtrigger" then [ "systemd-udev-settle.service" ] else [] + ) ++ job.requires; + wantedBy = (if job.startOn == "" then [] else if job.startOn == "ip-up" then [ "ip-up.target" ] else