[PATCH] avoid multiple "domain" entries in resolv.conf
Corey Hickey
bugfood-ml at fatooh.org
Wed Aug 10 12:40:05 PDT 2016
On 2016-08-09 03:19, David Woodhouse wrote:
> On Fri, 2016-08-05 at 20:21 -0700, Corey Hickey wrote:
>>
>> + # If multiple domains are listed, prefer the first for "domain".
>> + DOMAIN=${CISCO_DEF_DOMAIN%% *}
>
> Um.... is that a bashism? vpnc-script isn't supposed to require bash.
As far as I can tell it's part of POSIX shell. I tested it in dash and
it behaved the same way as in bash.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
$ CISCO_DEF_DOMAIN="foo bar baz"
$ DOMAIN=${CISCO_DEF_DOMAIN%% *}
$ echo "$DOMAIN"
foo
Thanks,
Corey
More information about the openconnect-devel
mailing list