[Pkg-sysvinit-devel] Re: Fixing hwclock.sh
Thomas Hood
jdthood at yahoo.co.uk
Fri Jan 6 15:13:19 UTC 2006
Henrique de Moraes Holschuh wrote:
> On Fri, 06 Jan 2006, Thomas Hood wrote:
>> > We *cannot* tolerate the whole boot crashing because of a sourced script
>> > screwing up, for example :( Is there a way to source initscripts and still
>> > tolerate broken initscripts without it doing nasty things to /etc/init.d/rc
>> > like causing it to _die_ ?
>>
>> There is no reasonable way. If a sourced script does "exit" then rc exits,
>> with all the consequences of that.
>
> I was more worried about flat out bugs when in -e mode or somesuch
I just checked. Neither /etc/init.d/rc nor any .sh initscript on my system
does "set -e". Which is good, but no guarantee that there aren't other
initscripts that do (or will in the future do) "set -e".
> Can either init itself or rc be teached to run sulogin and reboot if the
> regular rc runlevel scripts execution borks in any way? One or two forks
> before we run the whole thing is not bad if it increases resiliency, even if
> that means one extra process sitting around.
I can imagine this being done. But it may not be worth doing if what we are
defending against is programming errors.
We should get a check added to lintian.
* Error if any /etc/init.d/*.sh script does an "exit" or "set -e"
--
Thomas
More information about the Pkg-sysvinit-devel
mailing list