[systemd-devel] multi-user.target only wants network.service if I'm doing 'systemct show runlevel3.target'

Andrei Borzenkov arvidjaar at gmail.com
Wed Feb 11 12:10:31 PST 2015


В Wed, 11 Feb 2015 20:12:35 +0100
Lennart Poettering <lennart at poettering.net> пишет:

> On Thu, 05.02.15 01:07, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> 
> > > Just want to know why he didn't considered pushing this patch upstream.
> > > Apparently already two distros patch this downstream, so having a fix
> > > upstream would imho make sense.
> >
> > Because it was just a hack :)
> > 
> > Maybe Lennart's idea with the sysv generator is a better thing.
> 
> So, I have discussed this with Kay, David, Daniel, and co. And we
> kinda came to the conclusion that we might as well just drop the
> configurability where runlevel3-5.target point to. If we drop that, we
> can just keep them as symlink aliases in place, but the sysv
> generator won't create symlinks in them anymore. Instead it will
> create the right links directly in multi-user.target and
> graphical.target as necessary.
> 

Why not simply make generator resolve links to final destination? I bet
we already should have helper that does it.

> I think that would be the simplest, easiest solution for the
> problem. Redefining runlevels in the systemd context is kinda a crazy
> idea, and we should probably just say goodbye to it... I am retty sure
> pretty much nobody made use of this anyway.
> 
> Opinions?
> 

But the problem is not limited to legacy initscripts. It makes it
generally unsafe to have aliases via symlinks. Aliases were always
meant "for compatibility" but this problems exactly means that
"compatibility" is broken here - when you replace unit A with
compatibility link to unit B things may be broken unless you always
refer to A when you refer to B. At which point why have alias at all?


More information about the systemd-devel mailing list