From a7627c6d0784ca169b14265744ce356a7d740f62 Mon Sep 17 00:00:00 2001 From: Sebastien Luttringer Date: Tue, 31 May 2011 08:25:28 +0200 Subject: rc.d: Remove cd from the loop Signed-off-by: Sebastien Luttringer --- rc.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d b/rc.d index af29574..3c7fcb9 100755 --- a/rc.d +++ b/rc.d @@ -51,8 +51,9 @@ case $1 in "RUNLEVEL=${runlevel##* }" "CONSOLE=${CONSOLE:-/dev/console}" "TERM=$TERM") + cd / for i; do - [[ -x "/etc/rc.d/$i" ]] && cd / && /usr/bin/env -i "${ENV[@]}" "/etc/rc.d/$i" "$action" + [[ -x "/etc/rc.d/$i" ]] && /usr/bin/env -i "${ENV[@]}" "/etc/rc.d/$i" "$action" (( ret += !! $? )) # clamp exit value to 0/1 done esac -- cgit v1.2.3