On Sunday 28 February 2010, David Sommerseth wrote: > From: Dan Nelson <dnel...@users.sourceforge.net> > > Many of the scripts in the openvpn source have their shell set to > /bin/bash, but only two use bash features. The attached patch (against > openvpn-2.1_rc9) sets the shell on the rest of the scripts to /bin/sh for > better portability. The only scripts that actually require bash are > contrib/pull-resolv-conf/client.{up,down} ; they use the ${!var} variable > indirection feature.
Not only that, they also use arrays, which are not part of standard sh. For a POSIX-sh compliant solution thad does mostly the same thing (and handles multiple DOMAIN options as well, which client.{up,down} doesn't support), I suggest you look into the Gentoo-provided {up,down}.sh scripts (though they contain some Gentoo-specific parts, but those are easily removed). -- D.