On 18/08/11 09:25, sam...@openvpn.net wrote:
> > From: Samuli Seppänen <sam...@openvpn.net>
>
> > Original $KEY_CONFIG variable generation in broke if $EASY_RSA had
> whitespace in
> > it. This patch fixes the issue in a POSIX-compliant way.
>
> > Signed-off-by: Tanel Rebane <ta...@rebane.se>
> > Signed-off-by: Samuli Seppänen <sam...@openvpn.net>
> > Tested-by: Samuli Seppänen <sam...@openvpn.net>
> > ---
> >  easy-rsa/2.0/vars |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
>
> > diff --git a/easy-rsa/2.0/vars b/easy-rsa/2.0/vars
> > index 2ea1ced..780ecf6 100755
> > --- a/easy-rsa/2.0/vars
> > +++ b/easy-rsa/2.0/vars
> > @@ -26,7 +26,7 @@ export GREP="grep"
> >  # This variable should point to
> >  # the openssl.cnf file included
> >  # with easy-rsa.
> > -export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA`
> > +export KEY_CONFIG=$("$EASY_RSA"/whichopensslcnf "$EASY_RSA")
>
> Even though I personally like this syntax better, isn't it better to use
> the `` syntax instead of $() due to portability?  Or are we sure that $()
> functional everywhere nowadays?
>
>
> kind regards,
>
> David Sommerseth

There shouldn't be a difference, I did quite a bit of Googling just to
be sure. For example, the Dash shell seems to be used often as
POSIX-compliance reference implementation. From
<http://linux.die.net/man/1/dash>:

"Only features designated by POSIX, plus a few Berkeley extensions, are
being incorporated into this shell. We expect POSIX conformance by the
time 4.4 BSD is released."

Dash supports both $() and `` command substitution syntaces. Of course,
there might be some other shells which don't support the $() syntax. If
somebody knows any, please raise your voice :).

Samuli

Reply via email to