From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward503p.mail.yandex.net (forward503p.mail.yandex.net [77.88.28.113]) by sourceware.org (Postfix) with ESMTPS id A3E913858D1E for ; Wed, 10 Aug 2022 14:50:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A3E913858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru Received: from myt6-bd59def10a3e.qloud-c.yandex.net (myt6-bd59def10a3e.qloud-c.yandex.net [IPv6:2a02:6b8:c12:2487:0:640:bd59:def1]) by forward503p.mail.yandex.net (Yandex) with ESMTP id DC14211013F0; Wed, 10 Aug 2022 17:50:00 +0300 (MSK) Received: by myt6-bd59def10a3e.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id WLIUMFjKEt-o0h4ECCM; Wed, 10 Aug 2022 17:50:00 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1660143000; bh=WqkteMXUaNVmbYzKKs5uYKCZK7FVMK6qvHbk4UnjB1M=; h=In-Reply-To:Subject:Date:References:To:Message-ID:Reply-To:From; b=LT6or4tAeZvnN9SI4b961q5CmXiv3cjMYSz+xYgrFS+fqlkd0cEQU/MCB48tfEWq4 vL6oV8FaK7nLGqGrAgJN32oLTEfMvURWYAi/o8xzmzED5HZz5an9WgkA7S8rcJtLIz Zh1ANd6B341bSuoZ7ije5uRO9oa83qHMtULkzkpY= Authentication-Results: myt6-bd59def10a3e.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Wed, 10 Aug 2022 14:40:46 -0000 Date: Wed, 10 Aug 2022 17:40:46 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Reply-To: cygwin@cygwin.com Message-ID: <1512349222.20220810174046@yandex.ru> To: Christian Franke , cygwin@cygwin.com Subject: Re: resolv.conf and gnupg2 In-Reply-To: <61cf96e9-68f9-1186-9c02-61be61614f61@t-online.de> References: <61cf96e9-68f9-1186-9c02-61be61614f61@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, KAM_THEBAT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, 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: Wed, 10 Aug 2022 14:50:04 -0000 Greetings, Christian Franke! > 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. > 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. > - ipconfig may output scoped IPv6 addresses ("fe80::1%12") which are not matched by the awk script. > A draft patch is attached. It also avoids the tmp file and uses shell builtins where possible. Why not use netsh with `chcp 65001`? -- With best regards, Andrey Repin Wednesday, August 10, 2022 17:33:04 Sorry for my terrible english...