From: Gert Doering Date: Tue, 8 Jul 2014 07:20:54 +0000 (+0200) Subject: Call init script helpers with explicit path (./) X-Git-Tag: v2.3.5~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75c3a82e8085233306107495d6b1e0b1ab19eccf;p=thirdparty%2Fopenvpn.git Call init script helpers with explicit path (./) The provided OpenVPN init scripts scan /etc/openvpn for *.conf and run an OpenVPN process for each, and if a .sh script with the same base name exists, this is run before openvpn. Change from running "$name.sh" to "./$name.sh" - depending on the shell used, the script won't be found otherwise, and ensuring that the script isn't searched in $PATH is the right thing anyway. Reported in trac #423 Signed-off-by: Gert Doering Acked-by: David Sommerseth Message-Id: <1404804054-32424-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/8858 (cherry picked from commit cf31d5f32197159691fa9e3e4afcfc35307702d6) --- diff --git a/distro/rpm/openvpn.init.d.rhel b/distro/rpm/openvpn.init.d.rhel index 821abd586..cdf3e9deb 100755 --- a/distro/rpm/openvpn.init.d.rhel +++ b/distro/rpm/openvpn.init.d.rhel @@ -148,7 +148,7 @@ case "$1" in for c in `/bin/ls *.conf 2>/dev/null`; do bn=${c%%.conf} if [ -f "$bn.sh" ]; then - . $bn.sh + . ./$bn.sh fi rm -f $piddir/$bn.pid $openvpn --daemon --writepid $piddir/$bn.pid --config $c --cd $work diff --git a/distro/rpm/openvpn.init.d.suse b/distro/rpm/openvpn.init.d.suse index 2bac7f322..270024e89 100644 --- a/distro/rpm/openvpn.init.d.suse +++ b/distro/rpm/openvpn.init.d.suse @@ -161,7 +161,7 @@ case "$1" in for c in `/bin/ls *.conf 2>/dev/null`; do bn=${c%%.conf} if [ -f "$bn.sh" ]; then - . $bn.sh + . ./$bn.sh fi rm -f $piddir/$bn.pid $openvpn --daemon --writepid $piddir/$bn.pid --config $c --cd $work