resolv.conf and gnupg2
Christian Franke
Christian.Franke@t-online.de
Tue Aug 9 16:07:05 GMT 2022
Lee wrote:
> On 8/9/22, Christian Franke wrote:
>> Brian Inglis wrote:
>>> I've been running with /etc/resolv.conf for a few years now, generated
>>> from the ISP info from ipconfig and lists of public DNS servers and
>>> suffixes.
>>>
>>> The attached postinstall script 0p_l_etc_resolv_conf.dash generates a
>>> new resolv.conf and replaces the current if different every update.
>>> It is also run at cron startup and that covers system startup.
>>>
>>> The AWK script collects names and addresses from ipconfig ouput and
>>> adds lists of public DNS servers and public suffixes in the proper order.
>>>
>>> How this works with other ISPs or in other network environments is not
>>> anything I ever thought of testing externally.
>>> Feel feel to try it and change it if curious or interested.
>> This is an interesting approach, thanks for sharing.
> Yes, interesting script
>
>> Unfortunately the ipconfig output is always localized, so this does only
>> work OOTB with English versions of Windows. The ipconfig parsing is also
>> broken due to two reasons:
>>
>> - The current Cygwin versions of awk, grep and sed no longer convert
>> CR/LF -> LF on stdin, so '/FooBar$/' patterns never match.
> Which is handled by
> /\r/ { sub( /\r/, "", $NF) } # trim \r
Indeed - sorry for the noise. Then only the scoped IPv6 addresses were
the problem.
> I get " ca. org. com. net." appended to the search suffix list; that
> should be fixed.
These are apparently added unconditionally. Could be fixed by removing
lines 141-152 from the awk script.
--
Regards,
Christian
More information about the Cygwin
mailing list