delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/08/10/10:51:26

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 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
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
Date: Wed, 10 Aug 2022 17:40:46 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
X-Mailer: The Bat! (v9.3.4) Professional
Message-ID: <1512349222.20220810174046@yandex.ru>
To: Christian Franke <Christian DOT Franke AT t-online DOT de>, cygwin AT cygwin DOT com
Subject: Re: resolv.conf and gnupg2
In-Reply-To: <61cf96e9-68f9-1186-9c02-61be61614f61@t-online.de>
References: <bbf7534e-ef89-d74c-f897-656a9485bddf AT SystematicSw DOT ab DOT ca>
<61cf96e9-68f9-1186-9c02-61be61614f61 AT t-online DOT de>
MIME-Version: 1.0
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 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>
Reply-To: cygwin AT cygwin DOT com
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>

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...


-- 
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