public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Christian Franke <Christian.Franke@t-online.de>
To: cygwin@cygwin.com
Subject: Re: resolv.conf and gnupg2
Date: Tue, 9 Aug 2022 18:07:05 +0200	[thread overview]
Message-ID: <fb1401e6-f47b-c1c6-0f6a-2cd0682d234b@t-online.de> (raw)
In-Reply-To: <CAD8GWsuFjBMFYz9+Sf4bxrdec=9jrk6o+5yOJR5cYNsr+YM0FQ@mail.gmail.com>

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


  reply	other threads:[~2022-08-09 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  6:17 Brian Inglis
2022-08-09 12:58 ` Christian Franke
2022-08-09 14:51   ` Lee
2022-08-09 16:07     ` Christian Franke [this message]
2022-08-10 14:40   ` Andrey Repin
2022-08-11 13:36     ` Christian Franke
2022-08-19  9:13       ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb1401e6-f47b-c1c6-0f6a-2cd0682d234b@t-online.de \
    --to=christian.franke@t-online.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).