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: <61cf96e9-68f9-1186-9c02-61be61614f61 AT t-online DOT 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: 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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