From be145ad5dc4edfd7dffc74b8970aaafd0eb247f7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 22 Jan 2016 20:49:09 +0000 Subject: 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 (From OE-Core rev: 75cb4fe38fade382450c5f6f35d5dcf55962143e) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- meta/recipes-core/busybox/files/rcS | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta/recipes-core/busybox/files/rcS (limited to 'meta/recipes-core/busybox/files/rcS') 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 + -- cgit v1.2.3-54-g00ecf