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
This commit is contained in:
Christian Ruppert 2012-04-26 15:18:56 +02:00
parent 441272ff97
commit 9d0dce35c3

View File

@ -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%%.*}