aboutsummaryrefslogtreecommitdiff
path: root/sh/runscript.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'sh/runscript.sh.in')
-rw-r--r--sh/runscript.sh.in9
1 files 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