diff options
author | Jesse Young <jesse.young@gmail.com> | 2010-11-01 11:33:26 -0500 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-14 23:03:20 +0100 |
commit | 3adf2f558e157ef5087ca44f13e097a394ef7c78 (patch) | |
tree | 96e30ee04f008f2f1f20ae432fe31d42e68c186f /contrib/pull-resolv-conf/client.down | |
parent | Merge branch 'svn-BETA21' into bugfix2.1 (diff) | |
download | openvpn-3adf2f558e157ef5087ca44f13e097a394ef7c78.tar.xz |
Remove hardcoded path to resolvconf
Signed-off-by: Jesse Young <jesse.young@gmail.com>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'contrib/pull-resolv-conf/client.down')
-rw-r--r-- | contrib/pull-resolv-conf/client.down | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/pull-resolv-conf/client.down b/contrib/pull-resolv-conf/client.down index 38c585b..05f2d4d 100644 --- a/contrib/pull-resolv-conf/client.down +++ b/contrib/pull-resolv-conf/client.down @@ -34,9 +34,10 @@ # 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 -if [ -x /sbin/resolvconf ] ; then - /sbin/resolvconf -d "${1}" +if type resolvconf >/dev/null 2>&1; then + resolvconf -d "${1}" -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 |