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

Ian Jackson ijackson at chiark.greenend.org.uk
Thu Nov 22 15:27:57 GMT 2018


Mert Dirik writes ("Re: Bug#913247: Please provide a C implementation of /lib/init/init-d-script"):
> On 11/22/18, Ian Jackson <ijackson at chiark.greenend.org.uk> wrote:
> > So I think this would be fixed if /lib/init/init-d-script detected
> > this situation and set $0 to the original script name (which it gets
> > in $1).  That is probably desirable anyway.
> 
> The problem is there is no way of setting $0 inside a shell script as
> far as I know. So either init-d-script shouldn't be used in shebang or
> 40-systemd should handle a special case for it (this is up to the
> systemd maintainers as 40-systemd is in systemd package)

Ah, yes.  I looked at the dash manpage and didn't see anything
appropriate.  But it would be a simple matter to invent a new
variable, surely.

Ian.

-- 
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