On Wed, Feb 04, 2015 at 09:53:20PM +0100, Michael Biebl wrote: > [grr, accidentally dropped the mailing list on my previous reply] > > 2015-02-04 21:48 GMT+01:00 Lennart Poettering <lenn...@poettering.net>: > > On Wed, 04.02.15 21:15, Michael Biebl (mbi...@gmail.com) wrote: > > > >> 2015-02-04 2:12 GMT+01:00 Lennart Poettering <lenn...@poettering.net>: > >> > On Wed, 04.02.15 02:05, Michael Biebl (mbi...@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. Because it was just a hack :)
Maybe Lennart's idea with the sysv generator is a better thing. Zbyszek _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel