aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/files/rcS
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/files/rcS')
-rw-r--r--meta/recipes-core/busybox/files/rcS26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/files/rcS b/meta/recipes-core/busybox/files/rcS
new file mode 100644
index 0000000000..d18c26b4c3
--- /dev/null
+++ b/meta/recipes-core/busybox/files/rcS
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Stop all init scripts in /etc/init.d
+# executing them in reversed numerical order.
+#
+
+for i in /etc/rcS.d/S??* /etc/rc5.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 stop
+ . $i
+ )
+ ;;
+ *)
+ # No sh extension, so fork subprocess.
+ $i start
+ ;;
+ esac
+done
+