[Pkg-sysvinit-devel] Bug#339955: sysv-rc: /etc/init.d/*.sh should be sourced in runlevel S

Petter Reinholdtsen pere at hungry.com
Sat Nov 19 23:49:38 UTC 2005


[Brendan O'Dea]
> I'm not quite sure what the initial rationale was, although Adam Heath
> suggested on IRC that it could be to allow scripts to set environment
> variables which would propagate through to subsequent scripts.

I'm not sure why it is documented in policy, but the sysv-rc
implementation for rcS used to source these scripts to cut down the
boot time.  I'm not sure if it actually had any effect, but as far as
I can read from the source and history of the package, it was purely a
optimization, and not intended to pass variables around.

> Yes, I saw CONCURRENCY in /etc/init.d/rc.  Not quite sure how that's
> supposed to work with a value of "shell".  I presume that startpar
> is/will be a helper function/script that interprets the LSB
> "Required-Start" pseudo header?

startpar is just a helper to serialise the output from programs
running in parallel, and has nothing to do with the LSB headers.  The
dependency information can be used to order the scripts, and the
'shell' and 'startpar' argument will then run all scripts with the
same order value in parallel.  This speed up the boot.

> It won't currently, but will if the patch is applied.
> 
>   $ grep -lw exit /etc/rcS.d/*.sh | wc -l
>   12

Some of these are not reachable in the normal case, but others are.
And some of these have been in the scripts when the .sh scripts were
sourced, so I am unsure how this could work previously.




More information about the Pkg-sysvinit-devel mailing list