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

Michael Biebl mbiebl at gmail.com
Wed Feb 4 12:53:20 PST 2015


[grr, accidentally dropped the mailing list on my previous reply]

2015-02-04 21:48 GMT+01:00 Lennart Poettering <lennart at poettering.net>:
> On Wed, 04.02.15 21:15, Michael Biebl (mbiebl at gmail.com) wrote:
>
>> 2015-02-04 2:12 GMT+01:00 Lennart Poettering <lennart at poettering.net>:
>> > On Wed, 04.02.15 02:05, Michael Biebl (mbiebl at gmail.com) wrote:
>> >
>> >>
>> >>
>> >> [1] http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/debian/rules?id=8341218591c79b4fcfd2542b765b605faff8690b
>> >
>> > That hack is actually not that ugly... Though incomplete since it will
>> > only add refs to runlevel[1-5], but not 0,6...
>>
>> Does it? It adds the wants symlinks to poweroff and reboot as well,
>> and runlevel 0 and 6 are symlinks to those targets:
>
> Well, but the goal here is to make sure runlevel0.target and
> runlevel6.target are at least once referenced. For
> runlevel[1-5].target this is nicely achieved by pulling in
> systemd-update-utmp-runlevel.service, since that actually contains
> After= deps for those 5 runlevel targets... But it doesn't for 0 and 6,
> which hence never get loaded, thus not fixing the problem for them...
>
>> > But I still think the .wants symlinks from sysv-generator might be the
>> > better hack to apply...
>>
>> Do you mean, generating the same set of symlinks as above from within
>> the sysv-generator?
>> I guess I could cobble together a patch for that.
>
> No, s-u-u-r.s should not be involved really...
>
> Instead, the generator should iterate through runlevel0-6.target, then
> check where they point and add a .wants symlink from their destination
> to themselves. When systemd tries to load the .wants/ symlinks it will
> load these alias, figure out they point back to the respective
> targets, merge the targets. Finally, it will realize that the wants
> link is actually on itself, which it suppresses and all is good.
>
>> Alternatively, we could just create those symlink on make install, if
>> sysv support is enabled.
>
> The benefit of a generator is that people can reassign what their
> runlevels mean simply by overriding the one symlink in
> /etc/systemd/system for it. We will then derive the other symlink from
> that, automatically.

Since the original patch is from Zbyszek, I'm bringing him into the loop here.

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.


Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list