[PATCH] avoid multiple "domain" entries in resolv.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 10, 2016 at 8:40 PM, Corey Hickey <bugfood-ml at fatooh.org> wrote:
> 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

Hi,

Thanks for the patch.

I have following questions regarding this patch:

  a) In the patch I see that it is handling only for
modify_resolvconf_generic. What about other modify_*. This issue
affects them as well. (In my case it uses modify_resolvconf_manager).

  b)  Instead of choosing only the first domain, is it not possible to
use 'search' followed by the list of domains.   At least this is how I
updated the script to do, and that works fine.

            i) At least, that is how the modify_resolvconf_generic
seems to be operating when it parses the backup resolv.conf for
'search' entries first, if present, appends to them, if not uses the
'domain' keyword.

Regards,
Raghavendra


> _______________________________________________
> openconnect-devel mailing list
> openconnect-devel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/openconnect-devel



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux