[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18556 - sandervanderburg - in nixos/branches/upstart-0.6/modules/services: databases web-servers

Eelco Dolstra e.dolstra at tudelft.nl
Thu Nov 26 11:55:26 CET 2009


Hi,

Nicolas Pierron wrote:

> On Mon, Nov 23, 2009 at 14:26, Sander van der Burg
> <S.vanderBurg at tudelft.nl> wrote:
>> Modified: nixos/branches/upstart-0.6/modules/services/databases/mysql.nix
>> ===================================================================
>> --- nixos/branches/upstart-0.6/modules/services/databases/mysql.nix     2009-11-23 12:48:54 UTC (rev 18555)
>> +++ nixos/branches/upstart-0.6/modules/services/databases/mysql.nix     2009-11-23 13:26:33 UTC (rev 18556)
>> @@ -83,7 +83,7 @@
>>     jobs.mysql =
>>       { description = "MySQL server";
>>
>> -        startOn = "started filesystems";
>> +        startOn = "started network-interfaces";

This should probably be "started filesystems and started network-interfaces".

> For example, you don't want to write:
> 
>   startOn = "whatever"
> 
> but you may prefer:
> 
>   waitFor = [ (readableDir "/var/data/mysql") ];

We can let the "filesystems" job emit events when it mounts a filesystem.
Events can have arguments, so we can have a "mounted-filesystem
PATH=/mount-point" event.  Then we can have MySQL depend on it:

  startOn = "mounted-filesystem PATH=/var/data/mysql";

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list