summaryrefslogtreecommitdiff
path: root/root/etc/init.d/rcS
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2004-05-07 22:41:36 +0000
committerMike Baker <mbm@openwrt.org>2004-05-07 22:41:36 +0000
commitc055b4eb2d14cdc74600041d30334fbf0d5de2a9 (patch)
treed4696fe042a844d14719b109937a46dcf0f7ce57 /root/etc/init.d/rcS
parent5517f1169f618f5e85f764d81c90472dd528a55b (diff)
downloadmtk-20170518-c055b4eb2d14cdc74600041d30334fbf0d5de2a9.zip
mtk-20170518-c055b4eb2d14cdc74600041d30334fbf0d5de2a9.tar.gz
mtk-20170518-c055b4eb2d14cdc74600041d30334fbf0d5de2a9.tar.bz2
move to new init.d structure
SVN-Revision: 18
Diffstat (limited to 'root/etc/init.d/rcS')
-rwxr-xr-xroot/etc/init.d/rcS25
1 files changed, 25 insertions, 0 deletions
diff --git a/root/etc/init.d/rcS b/root/etc/init.d/rcS
new file mode 100755
index 0000000..9510e94
--- /dev/null
+++ b/root/etc/init.d/rcS
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Start all init scripts in /etc/init.d
+# executing them in numerical order.
+#
+for i in /etc/init.d/S??* ;do
+
+ # 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.
+ $i start
+ ;;
+ esac
+done