-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/11/10 01:22, Jesse Young wrote: > On Thu, Nov 11, 2010 at 00:25:03 +0100, David Sommerseth wrote: > On 01/11/10 17:33, Jesse Young wrote: >>>> Signed-off-by: Jesse Young <jesse.yo...@gmail.com> >>>> --- >>>> contrib/pull-resolv-conf/client.down | 5 +++-- >>>> contrib/pull-resolv-conf/client.up | 5 +++-- >>>> 2 files changed, 6 insertions(+), 4 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 > > Hi and thank you for your patch! > >> Hi David, Thanks for your comments. Hopefully, I will address them to >> your satisfaction. > > Even though I do see that this approach is much cleaner. Hardcoded > paths is not ideal. But I am not sure I like this way of test. It > works probably fine on up-to-date systems, but will it run on all most > bash versions? We must consider that there are some old systems with > older bash installations which we might break. > > I'd rather see a similar patch which checks the exit code instead of > something more undefined like this approach. Also for clarity in the > code of what we expect or not. > >> I quickly ran this if statement in dash, bash --posix, and busybox's >> implementation of sh, and all three worked as expected. In fact, >> this is POSIX behavior.
Perfect! When it's a defined standard, I'll accept it more easily :) Applied to bugfix2.1, to be merged into allmerged and beta2.2. commit 3adf2f558e157ef5087ca44f13e097a394ef7c78 Author: Jesse Young <jesse.yo...@gmail.com> List-Post: openvpn-devel@lists.sourceforge.net Date: Mon Nov 1 11:33:26 2010 -0500 Remove hardcoded path to resolvconf Signed-off-by: Jesse Young <jesse.yo...@gmail.com> Acked-by: David Sommerseth <d...@users.sourceforge.net> Signed-off-by: David Sommerseth <d...@users.sourceforge.net> kind regards, David Sommerseth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkzgXdUACgkQDC186MBRfrosWgCdEqCt+ik6013KlDRN5e67WnQ+ MOsAnRvzVAlOEi7KVZbiITonVyLWGZ82 =LI99 -----END PGP SIGNATURE-----