From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout06.t-online.de (mailout06.t-online.de [194.25.134.19]) by sourceware.org (Postfix) with ESMTPS id 85E273856DC6 for ; Tue, 9 Aug 2022 16:07:08 +0000 (GMT) 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 Received: from fwd75.dcpf.telekom.de (fwd75.aul.t-online.de [10.223.144.101]) by mailout06.t-online.de (Postfix) with SMTP id A4A4D209E5 for ; Tue, 9 Aug 2022 18:07:05 +0200 (CEST) Received: from [192.168.2.101] ([91.57.241.168]) by fwd75.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1oLRl3-2kRZVg0; Tue, 9 Aug 2022 18:07:05 +0200 Subject: Re: resolv.conf and gnupg2 To: cygwin@cygwin.com References: <61cf96e9-68f9-1186-9c02-61be61614f61@t-online.de> From: Christian Franke Message-ID: 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: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2022 16:07:10 -0000 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