Date: Thu, 14 Dec 2000 13:03:12 -0800 From: "Crist J. Clark" <cjclark@reflexnet.net> To: questions@freebsd.org Subject: dhclient Goofing /etc/resolv.conf Message-ID: <20001214130312.B38903@rfx-64-6-211-1.users.reflexcom.>
next in thread | raw e-mail | index | archive | help
This is really strange. My dhclient has started to mess up building /etc/resolv.conf. What happens is that the output generated in the /etc/dhclient-exit-hooks script is somehow finding its way into the resolv.conf. How it is doing this has me stumped. The section of /sbin/dhclient-script of interest is, echo search $new_domain_name >/etc/resolv.conf for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf done exit_with_hooks 0 All 'exit_with_hooks' does is load the /etc/dhclient-exit-hooks script. There are numbers in my firewall that need to be refreshed if my address changes so all it does is reload my firewall rules, #!/bin/sh # # dhclient-exit-hooks - 2000/07/29 # # Refresh firewall since IP address of external interface may # have changed. # Load in site configuration. Stolen from /etc/rc. if [ -f /etc/defaults/rc.conf ]; then . /etc/defaults/rc.conf source_rc_confs elif [ -f /etc/rc.conf ]; then . /etc/rc.conf fi # This is right out of /etc/rc.network (1.39.2.14). Disabling the # verbosity, lines left in but commented out. if [ -z "${firewall_script}" ] ; then firewall_script="/etc/rc.firewall" fi if [ -f "${firewall_script}" -a X"$firewall_enable" = X"YES" ]; then . "${firewall_script}" # echo -n 'Firewall rules loaded, starting divert daemons:' fi #End Now, once an hour when dhclient decides to renew our lease on the IP, it recreates the /etc/resolv.conf. It looks like, search reflexnet.net Flushed all rules. 00100 allow ip from any to any via lo0 00200 deny log logamount 10000 ip from any to 127.0.0.0/8 00000 deny log logamount 10000 ip from 64.6.211.149 to not 64.6.211.255 recv fxp0 . . . So we get the fist line that we want, but after that... I am at somewhat of a loss as to how this is happening. I have any number of ideas of how to stop it, but I'd rather figure out _why_ this is happening and fix it right. This seems like it is a bug because I can't see where I have done anything wrong. Hope someone out there has some ideas. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001214130312.B38903>