Bug#826214: Bug#913247: Please provide a C implementation of /lib/init/init-d-script

Mert Dirik mertdirik at gmail.com
Thu Nov 29 13:44:05 GMT 2018


On Fri, 23 Nov 2018 01:24:07 +0100 Michael Biebl <biebl at debian.org> wrote:
> Hi
>
> On Thu, 22 Nov 2018 16:01:33 +0000 Ian Jackson
> <ijackson at chiark.greenend.org.uk> wrote:
>
> > To the systemd maintainers: will you have time to look at this, and
> > make the appropriate change, soon ?  If not then one of us could
> > probably prepare a patch, if that would be helpful.
>
> A patch for 40-systemd would be highly appreciated [1].
>
> A few things which should be considered:
>
>
> - It should work with both
>
> #!/usr/bin/env /lib/init/init-d-script
>
> and
>
> if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
>     set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
> fi
>
> Otherwise we need a flag day and convert all packages using
> init-d-script at once.
>
>
> - Older versions of sysvinit-utils (prior to 2.88dsf-59.11) did not use
> __init_d_script_name=. 40-systemd should either work with older and
> newer versions of /lib/init/init-d-script or systemd would need a
> versioned Breaks: sysvinit-utils (<< 2.88dsf-59.11)
>
> I would prefer if we can avoid the Breaks as those are prone to
> complicate dist-upgrades.
>
>
>
> Regards,
> Michael
>
> [1] A MR via https://salsa.debian.org/systemd-team/systemd/ would be
> even better
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>

I've created a merge request for 40-systemd at
https://salsa.debian.org/systemd-team/systemd/merge_requests/19 .
Reviews and comments are welcomed.

If this is fully applied, systemd redirection will work correctly for
all init-d-script scripts (using init-d-script as the shebang or
sourcing it afterwards) under all init-d-script versions ( whether it
sets "__init_d_script_name" variable or not ) . In that case there
would be no need for "__init_d_script_name" code in
/lib/init/init-d-script anymore thus it can be dropped.



More information about the Pkg-systemd-maintainers mailing list