Systemd unit file implementation questions (ypbind)

Michal Hlavinka mhlavink at redhat.com
Thu Apr 14 14:35:45 UTC 2011


On Thursday, April 14, 2011 15:48:09 Lennart Poettering wrote:
> On Thu, 14.04.11 14:51, Michal Hlavinka (mhlavink at redhat.com) wrote:
> 
> > 
> > On Thursday, April 14, 2011 13:26:02 Michal Schmidt wrote:
> > > On 04/14/2011 11:14 AM, Michal Hlavinka wrote:
> > > > d) split it to more service files and make dependency there
> > > >
> > > > this would be incompatible change in configuration and hard to do,
> > > 
> > > Hard maybe, but solvable. Incompatibility happens from time to time. 
> > > That's what release notes are for.
> > 
> > Upstream has their cross-distribution packaging "guidelines" / effort / ... 
> > (I can't find the proper description.) Making configuration work different 
> > way then on other systems won't make anyone happy. If there is a way to 
> > keep current configuration working, then it's the way it will be done. Option c)
> > would work, I'm just looking for another possibility to make it work the same 
> > way but also more systemd-like way.
> 
> I presume their guidelines just cover SysV-style bootups?

It's not only about SysV, but also says something like: when user starts nut, it should 
start exactly those services that are needed based on /etc/sysconfig/nut MODE=? option

In old script one just say he wants to use mode foo and script starts required services (one of the free).

Also I don't see how is this different from for example dovecot (pop3 and imap server) 
where master process starts auth, imapd, pop3d,... there just is no master process.
This was handled by init script, because it was sufficient for this job. So it seems that 
systemd is not capable of doing this and "master" script will solve this.


> > > 
> > > What kind of dependencies exist between the three services? Are they 3 
> > > separate daemons? How exactly do they communicate with each other? 
> > 
> > upsd requires ups driver, upsmon requires upsd (but can be upsd from different machine), 
> > on machine where upsd and ups driver run there usualy is upsmon, but
> > it can be on different machine.
> 
> If upsd strictly requires ups driver, then a Requires= directive in its
> unit file is a good idea. 

If I use Requires= directive, it starts driver for upsd, but is it possible to specify to 
stop the driver when upsd stops? 




More information about the devel mailing list