[systemd-devel] [PATCH] shutdown: pass own argv to /run/initramfs/shutdown

Lennart Poettering lennart at poettering.net
Wed Oct 22 10:47:52 PDT 2014


On Tue, 30.09.14 17:02, Marius Tessmann (mus.svz at gmail.com) wrote:

> On 09/30/2014 05:03 AM, Zbigniew Jędrzejewski-Szmek wrote:
> >On Fri, Aug 29, 2014 at 05:51:45PM +0200, Marius Tessmann wrote:
> >>Since commit b1e90ec515408aec2702522f6f68c4920b56375b systemd passes
> >>its log settings to systemd-shutdown via command line parameters.
> >>However, systemd-shutdown doesn't pass these parameters to
> >>/run/initramfs/shutdown, causing it to fall back to the default log
> >>settings.
> >Hi,
> >sorry for the late reply.
> >
> >Your patch should work fine if /run/initramfs/shutdown accepts
> >those arguments, i.e. if it another systemd binary. But otherwise
> >it might fail, no?
> 
> Well, yes. I didn't really think about other implementations. I just checked
> the Dracut source and it shouldn't break anything there since it only parses
> the first argument as the verb [1]. I don't know what other implementations
> are out there, but I doubt they would break since they have no reason to
> parse
> anything but the first argument in the first place.
> 
> Also, the Initrd Interface [2] doesn't even mention what arguments are
> passed
> to the shutdown binary (not even the verb), so one could argue that
> implementations should expect this to change. ;)
> 
> Imho it would be enough to mention this in the release notes so that it can
> be fixed if necessary. Other implementations may even want to make use of
> the
> new parameters. ;)
> 
> If possible breakage for other implementations is not acceptable I would
> love
> to know how else this could/should be fixed properly.
> 
> [1] https://git.kernel.org/cgit/boot/dracut/dracut.git/tree/modules.d/99shutdown/shutdown.sh#n7
> [2] http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/

Patch looks fine to me, but Harald (as dracut guy) shoiuld say
something about this before we merge this.

Harald?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list