]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Call init script helpers with explicit path (./)
authorGert Doering <gert@greenie.muc.de>
Tue, 8 Jul 2014 07:20:54 +0000 (09:20 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 8 Jul 2014 19:06:44 +0000 (21:06 +0200)
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 <gert@greenie.muc.de>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
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)

distro/rpm/openvpn.init.d.rhel
distro/rpm/openvpn.init.d.suse

index 821abd5867a585ef885467713af8e577ea188eb2..cdf3e9deb9a2ea56bbdcb5e1b7c32860f1432e4d 100755 (executable)
@@ -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
index 2bac7f322821f243ccf1eb2b728df50f7432c4e2..270024e89940e967ad715c2edbd5e2e1cc305b75 100644 (file)
@@ -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