summaryrefslogtreecommitdiffstats
path: root/contrib/pull-resolv-conf/client.up
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pull-resolv-conf/client.up')
-rw-r--r--contrib/pull-resolv-conf/client.up5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/pull-resolv-conf/client.up b/contrib/pull-resolv-conf/client.up
index e81bd3a..b28d4d1 100644
--- a/contrib/pull-resolv-conf/client.up
+++ b/contrib/pull-resolv-conf/client.up
@@ -33,6 +33,7 @@
# A horrid work around, from a security perspective,
# is to run OpenVPN as root. THIS IS NOT RECOMMENDED. You have
# been WARNED.
+PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
# init variables
@@ -86,8 +87,8 @@ fi
out="# resolv.conf autogenerated by ${0} (${1})${nl}${dns}${nl}${ds}${domains}"
# use resolvconf if it's available
-if [ -x /sbin/resolvconf ] ; then
- printf "%s\n" "${out}" | /sbin/resolvconf -a "${1}"
+if type resolvconf >/dev/null 2>&1; then
+ printf "%s\n" "${out}" | resolvconf -p -a "${1}"
else
# Preserve the existing resolv.conf
if [ -e /etc/resolv.conf ] ; then