Systemd unit file implementation questions (ypbind)

Lennart Poettering mzerqung at 0pointer.de
Thu Apr 14 22:26:54 UTC 2011


On Thu, 14.04.11 15:48, Simo Sorce (ssorce at redhat.com) wrote:

> On Thu, 14 Apr 2011 20:35:07 +0200
> Miloslav Trmač <mitr at volny.cz> wrote:
> 
> > On Thu, Apr 14, 2011 at 8:21 PM, Lennart Poettering
> > <mzerqung at 0pointer.de> wrote:
> > > On Thu, 14.04.11 13:05, Chris Adams (cmadams at hiwaay.net) wrote:
> > >> Since they are config files (unlike the init scripts themselves),
> > >> changing them doesn't leave you with RPM wanting to replace them on
> > >> every package update either.
> > >
> > > Yupp, and this is much much prettier in systemd. After you copied
> > > the service file from /lib to /etc they are out of the package
> > > manager territory and will always override what has been configured
> > > by the distro packager.
> > Separating the program that integrates software into the distribution
> > (/etc/init.d/*) and user's configuration that is managed via
> > .rpm{save,new} is actually valuable.
> > 
> > If upstream changes how the program should be invoked and the Fedora
> > packager updates /etc/init.d/*, this change is transparent to users,
> > as long as the chang doesn't affect the specifics of user's
> > configuration in /etc/sysconfig - and even if it does, the user has
> > .rpm{save,new} and can figure out what has happened.
> > 
> > Copying the service file from /lib to /etc seems to lose this property
> > - if the /etc file "hides" the /lib file, the service will just break
> > with no indication that something needs to be updated.  Or does
> > systemd support "inheritance" of configuration from /lib to /etc so
> > that the user can only make the minimal changes necessary?
> >     Mirek
> 
> I was going to make exactly the same objection.
> Now rpm scripts will have to check and possibly have to muck with the
> copies in /etc or risk that the service in question will fail to work
> after a major update.
> 
> Sounds like trading one set of issues for another set of
> potentially bigger issues.

Well, it's quite a bit different. Because an init script is a complex
fragile beast you probably end up updating it quite often. OTOH a
systemd unit file is just a few lines usually, which means there is much
less to update. And due to magic stuff like socket and bus activation
most deps don't have to be configured, so things are much more robus anyway...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list