[systemd-devel] /usr vs /etc for default distro units enablement
Andrei Borzenkov
arvidjaar at gmail.com
Thu Dec 4 23:50:10 PST 2014
В Fri, 5 Dec 2014 02:39:09 +0100
Lennart Poettering <lennart at poettering.net> пишет:
> On Tue, 02.12.14 20:02, Uoti Urpala (uoti.urpala at pp1.inet.fi) wrote:
>
> > On Tue, 2014-12-02 at 01:51 +0100, Lennart Poettering wrote:
> > > 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>:
> > > > > 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 think this would be a very bad idea. Installing a system and then
> > upgrading it should give you the same state as installing a newer system
> > directly; silently leaving outdated configuration in use almost ensures
> > that systems will fail/degrade over time.
>
> Well, things are not that easy.
>
> If distro Foobarix decides one day that from this day on sendmail
> should be enabled again by default, what is the "right" upgrade path
> for old installs? Should it be enabled now, because that's the new
> default for new installs? Or should it stay disabled, since that's
> what the user is accustomed to?
>
That's one of the problems today - there is no way to distinguish
between "unit was not enabled due to previous defaults" and "unit was
disabled explicitly by admin". Although I'm afraid even this does not
really solve the issue as it leaves the case of "it was disabled by
default and admin was OK with it" out.
The idea of having default enabled/disabled state in /usr/lib and
letting admin override it in /etc allows to partially solve it while
making packaging really easy - changes to default unit states would
simply mean changing shipped files that is already handled right.
More information about the systemd-devel
mailing list