[Nix-dev] upstart-0.5

Marc Weber marco-oweber at gmx.de
Sun Mar 8 22:12:04 CET 2009


As you already know I'd like to support upstart-0.5 for various reasons.
One of them is that the sleep hacks could be removed. The most imortant
one is that I know that upstart-0.5 runs fine on my servers.

upstart-0.5 has one problem: There is no longer any support for logd.
logd is a daemon which logs stdout/err from upstart-0.3 jobs so that you
can read why a start-script or the job script itself has failed.

There is an easy workaround: using something like

script
  exec &> /var/log/jobname
  fail
endscript

It would be nice to add this debug line automatically using the
configuration.nix file.
This could be done by a regex.
Another way would be replacing the job script by attrs:

{
  env {
   PATH = [ pkgs.corutils config.boot.usptart ]; # <- should be default
  };

  scripts = {
    preStart = ''
    '';
    preStop = ''
    '';
    jobScript = ''
    '';
}

this way it would be even easier to add the debugging line when
assembling the final script file.

at least adding a path env attr name does make sense because upstart-0.5
does no longer have a default PATH setting (AFAIK). So the two paths
shown above could be added automatically to PATH.

How do you think about this?

Marc Weber



More information about the nix-dev mailing list