[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init system policy



Simon McVittie <smcv@debian.org> writes:

> On 21/11/14 14:04, Philip Hands wrote:
>> A quick glance at the manual leads me to try:
>> 
>>   systemctl disable gdm3
>> 
>> (and ... gdm, and a few other things) -- none of which work.
>
> Display managers are unusual here; they're an exception to the usual
> "enabledness" stuff.
>
> Normally, a service is enabled by adding symlinks so that an appropriate
> "target", like multi-user.target, "wants" the service. "systemctl
> enable/disable" (and Debian layers like the systemd support in
> update-rc.d) just adds/removes that symlink.
>
> However, systemd starts the (single) selected display manager via the
> alias display-manager.service, which is meant to point to whichever
> display manager is required; it is display-manager.service, not
> gdm3.service, that is configured to be "wanted" by multi-user.target.
> This is analogous to /etc/X11/default-display-manager, and display
> managers' maintainer scripts use that file to decide where
> display-manager.service should point.
>
> Display managers that participate in this mechanism do not need to be
> "wanted" under their own names (although if the selected one is, systemd
> will realise it's just an alias, and won't start it twice).
>
> FYI, you can prevent gdm3 from being started by systemd under any
> circumstances by applying a bigger hammer: "systemctl mask". This is
> syntactic sugar for making a symlink gdm3.service -> /dev/null.

OK, that all makes sense, I think.

Is there any way this isn't going to be an enormous surprise to people
that are used to the way that Debian usually treats /etc?

It seems that you're saying that throwing links in and out of /etc is
the way one turns things on and off, and that to actually disable them
one needs to symlink them to /dev/null.

I seem to have achieved the same effect by replacing all the symlinks I
could find with empty files -- I guess symlinks are preferred because
you don't need to try to open one that's pointing to /dev/null, is that
right?

I must say, I was pretty surprised when it dawned on me what was
actually going on, and I've been vaguely paying attention -- we're just
about to make this the way people's machines work without much warning
during upgrades, are we not (note that I think we shouldn't).

I suppose we can hope that most of them never start an xterm let alone
look at their init, but I'd expect some people to be pretty upset by
this, which is going to result in another round of, erm, fun.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY

Attachment: pgprzohcfJJhW.pgp
Description: PGP signature


Reply to: