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

Ian Jackson ijackson at chiark.greenend.org.uk
Thu Nov 22 16:01:33 GMT 2018

Control: retitle -1 Please would 40-systemd honour __init_d_script_name
Control: reassign -1 src:systemd

Mert Dirik writes ("Re: Bug#826214: Bug#913247: Please provide a C implementation of /lib/init/init-d-script"):
> "__init_d_script_name" variable is set inside init-d-script before
> sourcing /lib/lsb/init-functions and it can be used for this purpose.

Now that I reread #913247 I see we are going round in circles.  Thanks
for your patience, Mert, in explaining it again.

Dmitry wrote in #913247:
>  As far as I know, there is no way to modify "$0". So we have two
>  options:
>   * have systemd folks use `${__init_d_script_name##*/}' in
>     `40-systemd' instead of `$0'
>   * write wrapper in C, which sets $0 to value, expected by
>     `40-systemd'.  Actually, there is number of utilities floating
>     around, which set $0 to arbitrary value (`chpst' from bin:runit is
>     one of them :)), but we do not want to add new dependency to
>     essentail sysvinit-utils, don't we?

I think reimplementing init-d-script in C is the wrong solution to
this bug.  Certainly, if the only thing it is buying is us an ability
to manipulate $0.  I infer from Dmitry's closing of #913247 which
requests init-d-script in C, that he also doesn't like that idea.

So I think both Dmitry and I are in agreement that the right solution
here is the first of Dmitry's two bullet points above.  Ie, the
sysvinit maintainers are of the opinion that this should be fixed by
amending 40-systemd, which is part of the systemd package.

I'm therefore reassigning this bug.  Benda, if you disagree; or,
Dmitry, if I have misunderstood your view: please do say.

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.


Ian Jackson <ijackson at chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

More information about the Debian-init-diversity mailing list