[systemd-devel] /usr vs /etc for default distro units enablement

Lennart Poettering lennart at poettering.net
Mon Dec 1 16:51:57 PST 2014


On Tue, 18.11.14 16:09, Michael Biebl (mbiebl at gmail.com) wrote:

> 2014-11-18 15:59 GMT+01:00 Colin Guthrie <gmane at colin.guthr.ie>:
> > Didier Roche wrote on 18/11/14 13:58:
> >> This would be maybe a nice way for the admin to know what's coming from
> >> a distribution default or not. However, let's say I want to ensure that
> >> ssh will always be available on my server, I would (even if it's in my
> >> server preset) then systemctl enable openssh, no matter whatever future
> >> preset updates does (like disable it in the next batch upgrade).
> >
> > For the avoidance of doubt, I believe that running systemctl preset
> > should only ever happen on *first* install, never on upgrade or such like.
> >
> 
> And what are you going to do, if the unit file changes?
> Say v1  had
> 
> [Install]
> WantedBy=multi-user.target
> 
> and version B has
> [Install]
> WantedBy=foo.target

Package installs should probably not try to do something about this
case, just leave things as is.

I mean, let's not forget that admins should be able to define their
own targets and then enabled units in them and disable them
elsewhere. Package upgrades should not manipulate that. The first
installation of a package should enable a unit if that's what the
preset policy says, but from that point on the configuration is admin
configuration and not be changed anymore automatically.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list