rcS 479 Bytes
Newer Older
1
#!/bin/sh
2 3 4 5
if [ -n "$WRS_VERBOSE" ]; then
    set -x;
    SH_X="sh -x"
fi
6 7 8 9 10

# Start all init scripts in /etc/init.d
# executing them in numerical order.
#

11
for i in /etc/rcS/S??* ;do
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

     # Ignore dangling symlinks (if any).
     [ ! -f "$i" ] && continue

     case "$i" in
	*.sh)
	    # Source shell script for speed.
	    (
		trap - INT QUIT TSTP
		set start
		. $i
	    )
	    ;;
	*)
	    # No sh extension, so fork subprocess.
27
	    eval $SH_X $i start
28 29 30 31
	    ;;
    esac
done