MAN page from OpenSuSE aaa_base-11.1-10007.19.2.i586.rpm
Section: The SuSE boot concept (7)
Updated: Nov 15, 2000Index
INIT.D - The SuSE boot concept
The scripts for controlling the system are placed in/etc/init.d/
(they have been moved according to the Linux StandardBase (LSB) specification).These scripts are executed directly or indirectly by/sbin/init
,the father of all processes. The configuration of/sbin/init
is given by the file/etc/inittab
At boot time, the boot level master script/etc/init.d/bootis called to initialise the system (e.g. file system check, ...).It also executes some hardware init scripts linked into/etc/init.d/boot.d/.Then it calls/etc/init.d/boot.local,which executes the local commands.
After system startup,/sbin/initwill normally switch on the default run level given in/etc/inittab.It calls the run level master script/etc/init.d/rcto start or stop services provided by the other scripts under/etc/init.d/.
Both scripts, then boot level master script/etc/init.d/bootand the the run level master script/etc/init.d/rcstarts all other boot or runlevel scripts either sequentialor partial parallel within their dependencies order.
To control the services of a run level, the corresponding scriptsare linked into run level directories/etc/init.d/rc<X>.d/,where<X>=0,1,2,3,4,5,6,Sis the run level number.
There are two kinds ofsymboliclink: start links, which are called when entering a run level, andstop links, which are called when leaving a run level.Note that each service in the run levels 2, 3, 4, and 5 consists ofa startanda stop link. Within SuSE boot concept adifferentiallink scheme is used to be able tochangea runlevel in comparision with the former level.
If parallel executing of the boot scripts is enabled (see/etc/sysconfig/bootvariableRUN_PARALLEL)then both master scripts uses the programstartpar(8)which starts or stops multiple services in parallel.Startpar(8)will look for the files/etc/init.d/.depend.boot,/etc/init.d/.depend.start, and/etc/init.d/.depend.stopto get the dependencies for each service. The files willbe written, beside the symbolic links in the boot andrunlevel directories, by the programinsserv(8).
To avoid redundant starts when changing run levels, only thoseservices are started which have no start link in the previous runlevel. And to avoid redundant stops when changing run levels, onlythose services are stopped which have no start link in the currentlevel. To control this behaviour, the names of the scripts are added onthe names of the start and stop links.
To control the order of service starts and stops, the startand stop links include a number in their link name.
The system configuration files in/etc/sysconfigcontain most of the variables used to configure the installedservices.These variables can easily be changed byYaSTor by using an editor. After using an editor, the script/sbin/SuSEconfigmust be called to distribute the settings into the system.
starts or stops the line printer daemon for the printing service,according to the flag used:
- /etc/init.d/lpd start
- /etc/init.d/lpd stop
To do this automatically in run level3,this script is linked into/etc/init.d/rc3.d/with these two symbolic links
- /etc/init.d/rc3.d/S20lpd -> ../lpd
- /etc/init.d/rc3.d/K20lpd -> ../lpd
The corresponding link with the letterSis used to start a service. For the printing service the numberbetween the letterSand the name should be greater than the number of the start link ofthe network service. The corresponding link with the letterKis used to stop a service. The number of the stop link for theprinting service should be less than that of the stop link forthe network service so that the printer daemon is stopped beforeshutting down the network service.
Run levels and their services
- This level is used for halting the system. The only valid service forthis level is the scripthalt,which is linked into/etc/init.d/rc0.d/.The scripthaltexecutes/etc/init.d/halt.local.Special system issues for halt or reboot should be added there.
- This level is used for rebooting the system. The only valid service forthis level is the scriptreboot,which is linked into/etc/init.d/rc6.d/.The scriptrebootexecutes/etc/init.d/halt.local.Specials system issues for halt or reboot should be added there.
- This mode is used to switch from boot phase into single user mode.The last valid service for this mode is the scriptsingle,which is linked into/etc/init.d/rcS.d/.In this mode you have onlyoneconsole.
- According to the Linux Standard Base (LSB) specificationthis runlevel is used to switch from normal runlevel intosingle user mode.This is different from former SuSE Linux versions!
- The run level 2 is without remote networking. Note that on someother systems this is identical with the single user mode.This run level can have more than one virtual console.
- The run level 3 is with network. This run level is forserver stationsnot automatically runningX.
- The level 5 is with network andxdm(1).You should have a configured and perfectly runningX Window Systemfor thiswork stationrun level.
- The run level 4 is not (yet) used.
- This script is a model for writing your own. You can useinsserv(8)to include your own script into a run level.
(5),and theSuSE Linux
handbook, chapterThe SuSE boot concept
1996-2005 SuSE Linux AG, Nuernberg, Germany.
Florian La Roche <http://www.suse.de/feedback
>,Werner Fink <wernerAATTsuse.de>,Burchard Steinbild <http://www.suse.de/feedback
- Some details
- Run levels and their services
- SEE ALSO
This document was created byman2html,using the manual pages.