summaryrefslogtreecommitdiff
path: root/package/base-files/src/etc/init.d/rcS
blob: 77137e6d39de9dc8f06fa34c3d647920b33f555b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# disable kernel messages
if [ -f /proc/sys/kernel/printk ];then
	echo 0 > /proc/sys/kernel/printk
fi
ln -s /proc/self/fd/2 /dev/stderr
echo "System initialization ..."
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
: ${rcquiet=0}
{
	grep '^#INIT ' /etc/init.d/* | \
	    sort -nk2 | \
	    while read line; do
		test x"$rcquiet" = x"0" && echo -n "Starting ${line%%:*}... "
		sh ${line%%:*} autostart
		rc=$?
		case $rcquiet:$rc in
		(0:0)
			echo done.
			;;
		(0:*)
			echo "failed ($rc)."
			;;
		esac
	    done
} |tee /dev/stderr |logger -p 6 -t ''