Linux From Scratch
Prev | Chapter 7. Creating system boot scripts | Next

# Creating the rcS script

The second main boot script is the `rcS` script. Create a new file `/etc/init.d/rcS` containing the following:

`cat > rcS << "EOF"`
#!/bin/sh
# Begin /etc/init.d/rcS
#
# See the rc script for the extensive comments on the constructions
# used here
#
runlevel=S
prevlevel=N
umask 022
export runlevel prevlevel
trap ":" INT QUIT TSTP
#
# Collect all the S scripts in /etc/rcS.d and execute them
#
for i in /etc/rcS.d/S*
do
[ ! -f "$i" ] && continue;
$i start
done
# End /etc/init.d/rcS
`EOF`

Prev | Home | Next
Creating the rc script | Up | Creating the functions script