*- On 9 Mar, George Bonser wrote about "Re: rc.local -> What is the Debian Eqivalent" > On 9 Mar 1999, Miquel van Smoorenburg wrote: > >> /etc/rc.boot is wrong, /etc/rcS.d is wrong and /sbin/setup.sh is definitely >> very very wrong. Programs in thoise places will be executed way too early, >> before >> the system has been properly initialized. > > Uhm, I think in this case you are wrong. /sbin/setup.sh is the LAST thing > done so it is guaranteed to run AFTER everything is set up. >
George, why would Miquel be wrong about this? He and Bruce Perens are the ones the wrote the boot scripts for Debian. /etc/init.d/rcS is the FIRST thing that is run. It call runs the links in /etc/rcS.d then calls rc.boot(for backwards compatibility) and then /sbin/setup.sh. Then control is passed onto the appropriate run-level scripts in rc[2-5].d. So the appropriate place for local setup scripts is in /etc/init.d with links in the rc[2-5].d directores made by using update-rc.d. >From /usr/doc/sysvinit/README.runlevels.gz 1. Boot. When the systems boots, the /etc/init.d/rcS script is executed. It in turn executes all the S* scripts in /etc/rcS.d in alphabetical (and thus numerical) order. The first argument passed to the executed scripts is "start". The runlevel at this point is "N" (none). Only things that need to be run once to get the system in a consistent state are to be run. The rcS.d directory is NOT ment to replace rc.local. One should not start daemons in this runlevel unless absolutely nessecary. Eg, NFS might need the portmapper, so it is OK to start it early in the bootprocess. But this is not the time to start the squid proxy server. 2. Going multiuser. After the rcS.d scripts have been executed, init switches to the default runlevel as specified in /etc/inittab, usually "2". Init then executes the /etc/init.d/rc script which takes care of starting the services in /etc/rc2.d. >From /etc/init.d/rcS: # # For compatibility, run the files in /etc/rc.boot too. # [ -d /etc/rc.boot ] && run-parts /etc/rc.boot # # Finish setup if needed. # if [ -x /sbin/setup.sh ] then /sbin/setup.sh fi -- Brian --------------------------------------------------------------------- "Never criticize anybody until you have walked a mile in their shoes, because by that time you will be a mile away and have their shoes." - unknown Mechanical Engineering [EMAIL PROTECTED] Purdue University http://www.ecn.purdue.edu/~servis ---------------------------------------------------------------------