[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#513955: debian-policy: do not require /etc/init.d/*.sh scripts to be sourced



On Saturday 14 February 2009 14:01:40 Russ Allbery wrote:
> Kel Modderman <kel@otaku42.de> writes:
> 
> > It is the opinion of myself and Petter Reinholdtsen, maintainers of the
> > sysvinit package, that the last sentence of §9.3.1 of policy is no
> > longer relevant and should be removed:
> >
> > """Also, if the script name ends in .sh, the script will be sourced in
> > runlevel S rather than being run in a forked subprocess, but will be
> > explicitly run by sh in all other runlevels."""
> 
> I went to write the patch for this, but I paused when I saw that the other
> part of this sentence (explicitly running such scripts with sh at other
> run levels) is implemented.  The current /etc/init.d/rc runs the script
> directly if it doesn't end in .sh but runs it with sh if it does.

That's not an interface that has much merit either, it would be nice if we
didn't have to support it and we had the freedom to execute the scripts
directly.

> 
> At least on my system, all of the scripts ending in .sh have a proper #!
> line and are executable, so this wouldn't make any difference there, but I
> wanted to double-check first before also removing that since it appears to
> be implemented.
> 

I think all scripts in /etc/init.d/ must have a shebang line and be executable,
and be able to be executed directly. Executing .sh scripts explicitly by sh is
not something I see much value in supporting, Petter expressed similar
sentiment when I poked him on IRC.

Thanks, Kel.



Reply to: