From d9e28560d13d500b9e962a7cc32ea863c2c6b269 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Mar 2012 10:17:08 +0000 Subject: [PATCH] * Emit "expect daemon" for the mountall task. Otherwise it may get a USR1 signal before it has forked into the background (because it will be in the start/running state immediately). svn path=/nixos/trunk/; revision=33288 --- modules/system/upstart/upstart.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix index d624fd31745..5a5f6016b57 100644 --- a/modules/system/upstart/upstart.nix +++ b/modules/system/upstart/upstart.nix @@ -116,13 +116,11 @@ let end script ''} - ${optionalString (!job.task) ( - if job.daemonType == "fork" then "expect fork" else - if job.daemonType == "daemon" then "expect daemon" else - if job.daemonType == "stop" then "expect stop" else - if job.daemonType == "none" then "" else - throw "invalid daemon type `${job.daemonType}'" - )} + ${if job.daemonType == "fork" then "expect fork" else + if job.daemonType == "daemon" then "expect daemon" else + if job.daemonType == "stop" then "expect stop" else + if job.daemonType == "none" then "" else + throw "invalid daemon type `${job.daemonType}'"} ${optionalString (job.setuid != "") '' setuid ${job.setuid}