On Sun, Nov 18, 2012 at 01:03:26PM +0100, Michael Biebl wrote: > On 18.11.2012 05:05, Josh Triplett wrote: > > On Sat, Nov 17, 2012 at 05:48:39AM +0100, Michael Biebl wrote: > >> On 05.04.2012 06:03, Josh Triplett wrote: > >>> Package: systemd > >>> Version: 44-1 > >>> Severity: wishlist > >>> > >>> Testing systemd via the systemd package without using systemd-sysv > >>> typically involves setting init=/bin/systemd (or > >>> init=/lib/systemd/systemd) on the kernel command line. Please consider > >>> providing a grub.d script that automatically generates appropriate boot > >>> menu entries, similar to the existing script for Xen. > >> > >> Might be useful, yes. I've attached a proof-of-concept script which can > >> be dropped into /etc/grub.d. Make sure to chmod +x it. > >> > >> It's currently ordered *after* 10_linux, so sysvinit would still be the > >> default. > >> > >> What's a bit ugly is, that 10_linux is localized, but 15_linux isn't, > >> since it is missing translations for the string. > >> > >> title="$(gettext_quoted "%s, with Linux using systemd %s")" > > > > Since the second %s represents the Linux kernel version, not the systemd > > version, that should say "%s, with Linux %s, using systemd". > > > >> So if you use a non-en locale, you'll get a mix of languages. > >> > >>> systemd-sysv should divert away that script, to avoid generating > >>> redundant boot menu entries when the primary boot menu entry already > >>> uses systemd. > >> > >> I'd be wary to do that. Diversions are ugly and having a safety-net, > >> i.e. a simple boot entry to start good-old sysvinit is probably not a > >> bad idea. > > > > With systemd-sysv installed, a sysvinit entry won't exist; both entries > > will launch systemd. It might make sense to do otherwise, though. > > Perhaps the 15_linux_systemd script could check for systemd as the > > default init and provide sysvinit fallback entries if the system has > > sysvinit still installed? You'd have to make sure installing or > > removing systemd-sysv triggered update-grub, but otherwise that should > > address the concern you raised about having a fallback entry. > > I've integrated your suggestions and pushed the work to > http://anonscm.debian.org/gitweb/?p=pkg-systemd/systemd.git;a=shortlog;h=refs/heads/wip/grub-integration > > Comments/review welcome.
Looks reasonable. And reading it, I think it does make sense to just exit if /sbin/init points to systemd. To provide fallback entries for sysvinit with systemd installed, I think it might make sense for sysvinit to ship a similar 15_linux_sysvinit, which exits if /sbin/init points to sysvinit. - Josh Triplett -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

