summaryrefslogtreecommitdiffstats
path: root/package/initscripts/init.d/rcS
diff options
context:
space:
mode:
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>2015-07-13 23:00:08 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-14 01:51:52 +0200
commit89d39fc7a392530be043bac541ade0bef746edb6 (patch)
tree7ca4a2f38d7153867b049ffaec4c34a03461cdfb /package/initscripts/init.d/rcS
parent4d1a9d8cd8f4722ecb059552ebb837eef53f7a95 (diff)
downloadbuildroot-89d39fc7a392530be043bac541ade0bef746edb6.tar.gz
buildroot-89d39fc7a392530be043bac541ade0bef746edb6.zip
initscripts: new package
The folder init.d is currently installed by default since it's part of our skeleton. This patch creates a package out of it and make busybox/sysvinit depends on it. This way, if you chose another init, you don't end up with a useless init.d folder. [Thomas: - make the initscripts package selectable via a hidden bool - remove some unneeded changes in sysvinit.mk.] Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/initscripts/init.d/rcS')
-rwxr-xr-xpackage/initscripts/init.d/rcS27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/initscripts/init.d/rcS b/package/initscripts/init.d/rcS
new file mode 100755
index 0000000000..de411534da
--- /dev/null
+++ b/package/initscripts/init.d/rcS
@@ -0,0 +1,27 @@
+#!/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
+
OpenPOWER on IntegriCloud