On Mon, 31 May 1999, Julian Gilbey wrote: > > At 14:48 +0100 1999-05-30, Julian Gilbey wrote: > > >I second this, and propose that the section should be reworded as > > >follows: > > > > > >3.3.4. Boot-time initialisation > > >------------------------------- > > > > > > There used to be another directory, `/etc/rc.boot', which > > > contained scripts which were run once per machine boot. This has > > > been deprecated in favour of links from /etc/rcS.d to files in > > > /etc/init.d as described in section 3.3.1. No packages may place > > > files in /etc/rc.boot. > > > > There needs to be something about the fact that rcS scripts matching > > the pattern *.sh are sourced by /etc/init.d/rcS; and should not > > necessarily be required to support all of the standard arguments. > > Why should they not be? Which ones should they be? Anyway, this > belongs with report #33826 (cc'ing).
Back in the old days of Debian 1.2, there was a rather large /etc/init.d/boot script, which was run at boot time only. Later, this file was split up into several smaller files. These all have the .sh extension and are sourced (if there's a link to them in /etc/rcS.d/) by /etc/init.d/rcS, which is run by init before any 'real' runlevel is entered. When they are sourced, $1 is set to 'start' by a 'set start' command. Currently, of all the /etc/init.d/*.sh scripts on my potato system only hwclock.sh and keymaps.sh do anything with $1. I'd say that, for the sake of consistency, *.sh scripts shouldn't need arguments and scripts that do need them shouldn't have the .sh extension. Therefore, I think hwclock.sh and keymaps.sh should be renamed. Also, the *.sh scripts don't need the executable bit, _because_ they are sourced. Speaking of boot scripts, /etc/init.d/devpts.sh uses the 'exit' command, which can lead to unwanted results when scripts are sourced by another script (or by an interactive shell). Is this a bug? All of this is IMHO, BTW. Remco -- rd1936: 10:35pm up 6 days, 14:04, 5 users, load average: 1.19, 1.43, 1.42

