[Bug 217243] dhclient doesn't consistently update /etc/resolv.conf with what is defined in /etc/dhclient.conf

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 20 02:24:08 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217243

            Bug ID: 217243
           Summary: dhclient doesn't consistently update /etc/resolv.conf
                    with what is defined in /etc/dhclient.conf
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: conf
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: josh at endries.org

dhclient doesn't consistently update /etc/resolv.conf with what is defined in
/etc/dhclient.conf. Sometimes changes to /etc/dhclient.conf take effect,
usually they don't. I haven't been able to figure out a pattern to it.

This is on an AWS EC2 nano VM using cpercival's FreeBSD 11 AMI, running
11.0-RELEASE-p7.

If I add this line to /etc/dhclient.conf:

supersede domain-name "foo.com";

(in fact, that is all I have in that file)

*Sometimes* restarting dhclient via:

sudo service dhclient restart xn0

causes it to update /etc/resolv.conf with the search line, but usually it
doesn't do anything to /etc/resolv.conf. I probably tried 25 times after
various changes (trying to get it to work), touch, rm, etc., and it only
updated resolv.conf twice. One time I think all I did was add a space. I tried
without sudo and stop/start but neither made a difference.

Just now, after 10 failures, it changed. I added a space before the last " in
my file (i.e.: "foo.com ";). A restart caused the domain to show up in
resolv.conf. Removing the domain from resolv.confand restarting dhclient
without any changes to dhclient.conf didn't put the domain back into
resolv.conf, however. Changing dhclient.conf by removing the space and
restarting dhclient DID result in the domain being put back in to resolv.conf.
Another restart, no change in resolv.conf. Adding the space back worked.

I wonder if it caches something somewhere so only changes to the actual domain
value (string) are causing it to regenerate resolv.conf.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list