honour K?? and S?? in rcS
[buildroot.git] / target / generic / target_busybox_skeleton / etc / init.d / rcS
blob46fed02469797b6e23245dc75d0b6f3b11e31cef
1 #!/bin/sh
4 # Start all init scripts in /etc/init.d
5 # executing them in numerical order.
7 if test "x$1" = "xstop"
8 then
9 who="K??*"
10 what="stop"
11 else
12 who="S??*"
13 what="start"
15 for i in /etc/init.d/$who ;do
17 # Ignore dangling symlinks (if any).
18 [ ! -f "$i" ] && continue
20 case "$i" in
21 *.sh)
22 # Source shell script for speed.
24 trap - INT QUIT TSTP
25 set $what
26 . $i
30 # No sh extension, so fork subprocess.
31 $i $what
33 esac
34 done