www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/08/09/12:08:06

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 85E273856DC6
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=t-online.de
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=t-online.de
Subject: Re: resolv.conf and gnupg2
To: cygwin AT cygwin DOT com
References: <bbf7534e-ef89-d74c-f897-656a9485bddf AT SystematicSw DOT ab DOT ca>
<61cf96e9-68f9-1186-9c02-61be61614f61 AT t-online DOT de>
<CAD8GWsuFjBMFYz9+Sf4bxrdec=9jrk6o+5yOJR5cYNsr+YM0FQ AT mail DOT gmail DOT com>
From: Christian Franke <Christian DOT Franke AT t-online DOT de>
Message-ID: <fb1401e6-f47b-c1c6-0f6a-2cd0682d234b@t-online.de>
Date: Tue, 9 Aug 2022 18:07:05 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
SeaMonkey/2.53.12
MIME-Version: 1.0
In-Reply-To: <CAD8GWsuFjBMFYz9+Sf4bxrdec=9jrk6o+5yOJR5cYNsr+YM0FQ@mail.gmail.com>
X-TOI-EXPURGATEID: 150726::1660061225-01453B16-B239D258/0/0 CLEAN NORMAL
X-TOI-MSGID: fcfb9f2e-7fa1-4874-b3c7-a6f326790731
X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, FREEMAIL_FROM,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019