aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorConrad Hoffmann2017-08-02 20:14:34 +0200
committerDavid Sommerseth2017-08-14 15:35:57 +0200
commit94c1ce22ebcc1f672bb80598afccc130aa01fafc (patch)
tree1a6bf77088a8db8b452a06e598d60ce146a6c05e /contrib
parentc43045ca0590364552fbd060cc65ee1c50a4866a (diff)
downloadopenvpn-94c1ce22ebcc1f672bb80598afccc130aa01fafc.zip
openvpn-94c1ce22ebcc1f672bb80598afccc130aa01fafc.tar.gz
Use provided env vars in up/down script.
This makes the down script work both as regular down script as well as with the down-root plugin. The up script is just changed for consistency. Signed-off-by: Conrad Hoffmann <ch@bitfehler.net> Acked-by: David Sommerseth <davids@openvpn.net> Message-Id: <20170802181435.14549-2-ch@bitfehler.net> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15165.html Signed-off-by: David Sommerseth <davids@openvpn.net>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pull-resolv-conf/client.down2
-rw-r--r--contrib/pull-resolv-conf/client.up4
2 files changed, 3 insertions, 3 deletions
diff --git a/contrib/pull-resolv-conf/client.down b/contrib/pull-resolv-conf/client.down
index 05f2d4d..90bc589 100644
--- a/contrib/pull-resolv-conf/client.down
+++ b/contrib/pull-resolv-conf/client.down
@@ -37,7 +37,7 @@
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
if type resolvconf >/dev/null 2>&1; then
- resolvconf -d "${1}" -f
+ resolvconf -d "${dev}" -f
elif [ -e /etc/resolv.conf.ovpnsave ] ; then
# cp + rm rather than mv in case it's a symlink
cp /etc/resolv.conf.ovpnsave /etc/resolv.conf
diff --git a/contrib/pull-resolv-conf/client.up b/contrib/pull-resolv-conf/client.up
index 8858b47..260c038 100644
--- a/contrib/pull-resolv-conf/client.up
+++ b/contrib/pull-resolv-conf/client.up
@@ -87,11 +87,11 @@ elif [ $ndoms -gt 1 ]; then
fi
# This is the complete file - "$domains" has a leading space already
-out="# resolv.conf autogenerated by ${0} (${1})${nl}${dns}${ds}${domains}"
+out="# resolv.conf autogenerated by ${0} (${dev})${nl}${dns}${ds}${domains}"
# use resolvconf if it's available
if type resolvconf >/dev/null 2>&1; then
- printf "%s\n" "${out}" | resolvconf -p -a "${1}"
+ printf "%s\n" "${out}" | resolvconf -p -a "${dev}"
else
# Preserve the existing resolv.conf
if [ -e /etc/resolv.conf ] ; then