all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bone Baboon <bone.baboon@disroot.org>
To: Vincent Legoll <vincent.legoll@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Edits to `etc/resolv.conf` being overwritten
Date: Sat, 10 Apr 2021 15:50:08 -0400	[thread overview]
Message-ID: <87wnt9ex73.fsf@disroot.org> (raw)
In-Reply-To: <CAEwRq=rT3=DkLKKj-T4uA5x2p9txTVKxV6KyLuW-TSoqx9YvRA@mail.gmail.com>

Vincent Legoll writes:
> Have a look at the "LEASE REQUIREMENTS AND REQUESTS"
> section from man dhclient.conf, you should be able to make
> it *NOT* require "name-servers"...

Thanks you for this helpful suggestion.

After looking at the section you pointed out in man page for
dhclient.conf I have come up with something that stops `sudo dhclient
<wireless-interface>` from overwriting `/etc/resolv.conf`.  This
approach also allows the system configuration to manage the contents of
`/etc/resolv.conf` which is an improvement over using `chattr +i
/etc/resolv.conf` which did not.

Relevant sections of system configuration are:

At the top level outside the `operating-system` definition.
```
(define dhclient-configuration
  "request subnet-mask, broadcast-address, time-offsets, routers, host-name;
")
```
Note:
These were deliberately excluded from `request`: `domain-name`,
`domain-name-servers`, `name-servers` and `domain-search`.

A service in the services definition.
```
(simple-service 'dhclient-service
                etc-service-type
                `(("dhclient.conf",
                   (plain-file "dhclient.conf"
                               dhclient-configuration))))
```


  reply	other threads:[~2021-04-10 19:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02  1:36 Edits to `etc/resolv.conf` being overwritten Bone Baboon
2021-04-02  4:57 ` Jérémy Korwin-Zmijowski
2021-04-02  7:43 ` phil
2021-04-02 13:08   ` Bone Baboon
2021-04-02 16:07     ` Gary Johnson
2021-04-06 21:41       ` Bone Baboon
2021-04-07 14:34         ` Gary Johnson
2021-04-08 19:07           ` Bone Baboon
2021-04-08 19:17             ` Vincent Legoll
2021-04-10  3:40               ` Bone Baboon
2021-04-10  9:23                 ` Vincent Legoll
2021-04-10 19:50                   ` Bone Baboon [this message]
2021-04-09  3:22             ` Vladimir Sedach
2021-04-10  3:28               ` Bone Baboon

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=87wnt9ex73.fsf@disroot.org \
    --to=bone.baboon@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=vincent.legoll@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.