From b1a47394b6910003685f96f83898262c7fef2080 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 3 Feb 2009 18:26:29 +0100 Subject: [PATCH] honour K?? and S?? in rcS --- target/generic/target_busybox_skeleton/etc/init.d/rcS | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/target/generic/target_busybox_skeleton/etc/init.d/rcS b/target/generic/target_busybox_skeleton/etc/init.d/rcS index de41153..46fed02 100755 --- a/target/generic/target_busybox_skeleton/etc/init.d/rcS +++ b/target/generic/target_busybox_skeleton/etc/init.d/rcS @@ -4,7 +4,15 @@ # Start all init scripts in /etc/init.d # executing them in numerical order. # -for i in /etc/init.d/S??* ;do +if test "x$1" = "xstop" +then + who="K??*" + what="stop" +else + who="S??*" + what="start" +fi +for i in /etc/init.d/$who ;do # Ignore dangling symlinks (if any). [ ! -f "$i" ] && continue @@ -14,13 +22,13 @@ for i in /etc/init.d/S??* ;do # Source shell script for speed. ( trap - INT QUIT TSTP - set start + set $what . $i ) ;; *) # No sh extension, so fork subprocess. - $i start + $i $what ;; esac done -- 2.11.4.GIT