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

Michael Biebl biebl at debian.org
Sat Dec 1 22:00:16 GMT 2018


Hi Mert!

Am 29.11.18 um 14:44 schrieb Mert Dirik:
> 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.


I'm still convinced, that fixing this properly in init-d-script would be
the much better solution. If init-d-script was implemented in C, it
could be used as a shebang/interpreter on non-Linux and it would be
possible to have $0 be set properly. Which also means, no changes to
40-systemd would be necessary.

Now we have the unfortunate situation, that implementation details like
__init_d_script_name leak into 40-systemd (or the init-d-script name in
your second commit), and I do not like that at all.

Also, keep in mind, that 40-systemd might not be the only script which
relies on $0 being set properly. E.g. pidofproc in
/lib/lsb/init-functions uses $0. So I can only hope, that no init script
based on init-d-script ever uses pidofproc or $0 directly.

In the interest of unbreaking the current situation, I'm ok with merging
this MR, even if I'm not happy with the overall solution.
That said, I very much appreciate the detailed testing you did and the
effort you put into this MR. The only (minor) comment I have, is that we
prefer "gbp dch" style git coments. Which means, Closes statements are
listed as

Closes: #12345

I'll fix that up when I pull the MR though, so no need to push an update
for that.

Thanks again, Mert.

Regards,
Michael


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20181201/b336dfaa/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list