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

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 D58D9385AE4F
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=cc:to:subject:message-id:date:from:references:in-reply-to
:mime-version:from:to:cc;
bh=z0ajGDNZBmRkfw+SjuWAlqEuIC6PW+j3iKNd7JPn5zA=;
b=DemS2q65j2h0f7aWCtymBq5wzaItupRQHAr0YOpH7Gp521tZ9/JyMBuPEak4i0g8+y
Qmlvj4rg7qR02Zv0FZ7nmql58e2kEB8WZdwz/G0zjugjnCJqejfRol/WlAk6q5eCU7Ch
IxDkSumya4KKOR3Qench4wnPCoGEpMSGHVdbEWhCH0D0jgWwj92Yqc0/faRBrkW4Rypb
kEysx/o+u2QCroZNTBAPX90VdtWLWaqlIrLX4DQG1gBPLs5QDN6SKCeGAkOaYCzb6ujp
bxihF4C7HXWwgA+liHHQ9vvYvvbO1SbrbEPPLmGvQZ4Ryrcb6KldvqP+b88wBKneDNJS
wLtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=cc:to:subject:message-id:date:from:references:in-reply-to
:mime-version:x-gm-message-state:from:to:cc;
bh=z0ajGDNZBmRkfw+SjuWAlqEuIC6PW+j3iKNd7JPn5zA=;
b=tqviw+AMsrNSQDqzrZ43g/Tvia2+AYhZZXvLdIQyZq8aVrPsGP4HJ2Aq3eM4En33W1
SUhG0SHGBVnzqaHYSxC3ZSHIV+a2AK6Z+tUTYYLLJBmXQ1VcwIG93/C6KsFWDV2rlVdu
O/3/+8EN5EFxNs9yDFOCw+5WqF4QLOnET+K3Nv6VY5I1cY2m/QiQF8XzePQzIr9IzMI7
PTMwwBzZDEk9wyNjMxLLfTCEdDURvxCYOUnQkisx+EsPCPu8J7OmAk8oEoFXusEj3j7s
kRAh/36OfhQrE8/pLQ2bkPNrbkInUYevkFFD+3c/MJc3/7wPdSb+aYpFpTZ8JCwiIO/e
Jsxw==
X-Gm-Message-State: ACgBeo1mvnPwY79RWGdY8+VkF06YtnLWkoe0sAgJ69FHpkBuB7uFcymh
sjdseF9mIuNviNy/j5GIQNOC+SExm5lfzCh0I34=
X-Google-Smtp-Source: AA6agR4+oZssWasxGZmtQZxULSPRhAkqMqzdRE4zCrj4LAMaBm0wKdC1qClbbhzfVy9e3B/qNzWARm0ZICsdUR0nqNM=
X-Received: by 2002:a05:620a:4306:b0:6a9:7122:edb2 with SMTP id
u6-20020a05620a430600b006a97122edb2mr17564262qko.502.1660056669182; Tue, 09
Aug 2022 07:51:09 -0700 (PDT)
MIME-Version: 1.0
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>
From: Lee <ler762 AT gmail DOT com>
Date: Tue, 9 Aug 2022 10:51:08 -0400
Message-ID: <CAD8GWsuFjBMFYz9+Sf4bxrdec=9jrk6o+5yOJR5cYNsr+YM0FQ@mail.gmail.com>
Subject: Re: resolv.conf and gnupg2
To: Christian Franke <Christian DOT Franke AT t-online DOT de>
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,
FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, 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>
Cc: 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>

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

I get " ca. org. com. net." appended to the search suffix list; that
should be fixed.

Regards,
Lee

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