From 8d63719418de14248bb4bd3b4a0ce5599f8f3092 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 26 Apr 2012 12:19:42 -0500 Subject: Change the working directory for depend only We already have a special case for depend processing, so we should change the working directory there only. This prevents us from forcing all init scripts to be run in the init directory. --- sh/runscript.sh.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index a4d9e7cf..bc93b511 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -174,10 +174,6 @@ status() yesno $RC_DEBUG && set -x -# Enter the dir of the init script to fix the globbing with e.g. depend() -# bug 412677 -cd ${RC_SERVICE%/*} - _conf_d=${RC_SERVICE%/*}/../conf.d # If we're net.eth0 or openvpn.work then load net or openvpn config _c=${RC_SVCNAME%%.*} @@ -237,7 +233,12 @@ while [ -n "$1" ]; do # Special case depend if [ "$1" = depend ]; then shift + + # Enter the dir of the init script to fix the globbing + # bug 412677 + cd ${RC_SERVICE%/*} _depend + cd / continue fi # See if we have the required function and run it -- cgit v1.2.3