summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2012-04-26 15:18:56 +0200
committerChristian Ruppert <idl0r@gentoo.org>2012-04-26 15:18:56 +0200
commit9d0dce35c3e46b4515499f3f0f1c47645be0bc48 (patch)
tree0f8052c83ecb8a2c0f36659515ccced8d4b5f1a1
parent441272ff97b2dec4c3566239acf501c88f3026c8 (diff)
downloadopenrc-9d0dce35c3e46b4515499f3f0f1c47645be0bc48.tar.gz
openrc-9d0dce35c3e46b4515499f3f0f1c47645be0bc48.tar.bz2
openrc-9d0dce35c3e46b4515499f3f0f1c47645be0bc48.tar.xz
Let runscript enter the service dir before expand globs
Enter the service directory, like gendeps.sh does, to make sure globs are expanded in it rather than in /. That makes sure that globbing like "need *" will end up in all files of the init.d directory. Signed-off-by: Christian Ruppert <idl0r@gentoo.org> Reported-by: Guenther Brunthaler <gb_about_gnu@gmx.net> X-Gentoo-Bug: 412677 X-Gentoo-Bug-URL: https://bugs.gentoo.org/412677
-rw-r--r--sh/runscript.sh.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index 15cdb86..a4d9e7c 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -174,6 +174,10 @@ 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%%.*}