[systemd-devel] Virtual dependencies

Mike Kazantsev mk.fraggod at gmail.com
Tue Aug 21 10:56:58 PDT 2012


On Tue, 21 Aug 2012 14:31:03 +0200
David.Yates at continental-corporation.com wrote:

> Hi All,
> 
> 
> 
> I am hoping someone can help me with a dependency problem that I am 
> currently having and I assume there is already a simple solution available 
> that I am missing.
> 
> I was looking for some handling inside of systemd that would work similar 
> to the concept of virtual packages in the Debian package management 
> situation.
> 
> Whereby, if I install an application that requires a mail transport agent 
> then that application can be set as dependent on a virtual class of 
> service that can be fulfilled by one of many applications that can be 
> installed.
> 
> This would be something like a "Provides" tag in the unit file. I have 
> seen the Alias tag and assume that that could be used in a similar way but 
> I am not sure what happens if you have multiple applications that alias to 
> the same virtual name. This would need some way to tell systemd which app 
> is actually the currently selected app for that virtual class.
> 

Sound like it can be solved with something like Wants=mta.target in,
say, postfix.service and sendmail.service, so mail-something.service can
just have After=mta.target and/or Requisite=mta.target in the same way
as network.target currently works.


> The goal of this all being obviously to be able to handle runtime 
> dependencies and automatically starting the required underlying services 
> when needed.
> 
> Thanks for any help and sorry if I have missed a really easy way that this 
> should be handled.
> 
> 
> Thanks
> 
> 
> Dave

-- 
Mike Kazantsev // fraggod.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120821/1bf61f98/attachment.pgp>


More information about the systemd-devel mailing list