summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/files/rcK
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-22 20:49:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 10:55:44 +0000
commit75cb4fe38fade382450c5f6f35d5dcf55962143e (patch)
treea4fe1110757c8b5844adc758c32238b8e0250043 /meta/recipes-core/busybox/files/rcK
parent7d6a2856cd89b7233aaaf9b12c75cd8ccf73faa9 (diff)
downloadopenembedded-core-contrib-75cb4fe38fade382450c5f6f35d5dcf55962143e.tar.gz
busybox: Add support for busybox-init
in config metadata we can configure busybox based init and device initializer ( mdev ) using e.g. VIRTUAL-RUNTIME_dev_manager = "busybox-mdev" VIRTUAL-RUNTIME_login_manager = "busybox" VIRTUAL-RUNTIME_init_manager = "busybox" VIRTUAL-RUNTIME_initscripts = "initscripts" VIRTUAL-RUNTIME_keymaps = "keymaps" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" busybox can be used to provide init system combined with mdev it makes it a complete init system for really tiny systems. This patch uses above defines to configure features in busybox to enable the init system and mdev in a configurable manner Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/files/rcK')
-rw-r--r--meta/recipes-core/busybox/files/rcK25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/files/rcK b/meta/recipes-core/busybox/files/rcK
new file mode 100644
index 0000000000..050086ecd8
--- /dev/null
+++ b/meta/recipes-core/busybox/files/rcK
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Stop all init scripts in /etc/init.d
+# executing them in reversed numerical order.
+#
+for i in /etc/rc6.d/K??*; 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 stop
+ ;;
+ esac
+done
+