summaryrefslogtreecommitdiff
path: root/contrib/pull-resolv-conf
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-02 06:57:04 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-02 06:57:04 +0200
commita6daf938f5f616a4a67caa6580b0c99e9a8c3779 (patch)
tree4b23e4201976a2324b6bbd7e5ae3a9f78bbac417 /contrib/pull-resolv-conf
parent9683f890944ffb114f5f8214f694e0b339cf5a5a (diff)
New upstream version 2.4.4upstream/2.4.4
Diffstat (limited to 'contrib/pull-resolv-conf')
-rw-r--r--contrib/pull-resolv-conf/client.down6
-rw-r--r--contrib/pull-resolv-conf/client.up4
2 files changed, 7 insertions, 3 deletions
diff --git a/contrib/pull-resolv-conf/client.down b/contrib/pull-resolv-conf/client.down
index 05f2d4d..c9090b5 100644
--- a/contrib/pull-resolv-conf/client.down
+++ b/contrib/pull-resolv-conf/client.down
@@ -30,6 +30,10 @@
# the client "up" script will run fine, but the "down" script
# will require the use of the OpenVPN "down-root" plugin
# which is in the plugins/ directory of the OpenVPN source tree
+# The config example above would have to be changed to:
+# client
+# up /etc/openvpn/client.up
+# plugin openvpn-plugin-down-root.so "/etc/openvpn/client.down"
# A horrid work around, from a security perspective,
# is to run OpenVPN as root. THIS IS NOT RECOMMENDED. You have
@@ -37,7 +41,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