Improve the dependencies of units generated by the Upstart emulation

This commit is contained in:
Eelco Dolstra 2012-06-18 00:22:18 -04:00
parent 42ee3b4209
commit 673bf12b1d

View File

@ -57,6 +57,9 @@ let
''
[Unit]
Description=${job.description}
${if job.startOn == "stopped udevtrigger" then "After=systemd-udev-settle.service" else
if job.startOn == "started udev" then "After=systemd-udev.service"
else ""}
[Service]
Environment=PATH=${job.path}
@ -94,10 +97,7 @@ let
${optionalString (!job.task && job.respawn) "Restart=always"}
'';
wantedBy =
if job.startOn == "" then [ ]
else if job.startOn == "startup" then [ "basic.target" ]
else [ "multi-user.target" ];
wantedBy = if job.startOn == "" then [ ] else [ "multi-user.target" ];
};