15.06.2012 23:09, Varuna написал:
> Hello Folks,
> Noticed a strange issue with the creation / update of
> /etc/resolv.conf. The details of the system that I noticed the issue
> on is:
> Version : FreeBSD 8.0
> Patch level: not patched
> Uname: FreeBSD shastry.eudaemonicsystems.net 8.0-RELEASE FreeBSD
> 8.0-RELEASE #0: Thu Sep 29 22:37:51 IST 2011
> root@shas...:/usr/obj/usr/src/sys/SHASTRY i386
> I generally have a static IP 192.168.98.6 (via rc.conf) for my
> Beastie. The contents of my /etc/resolv.conf is as follows:
> domain eudaemonicsystems.net
> nameserver 18.104.22.168
> nameserver 22.214.171.124
> nameserver 126.96.36.199
> No matter how many times I reboot the system, the resolv.conf does not
> get overwritten when configured with a static IP.
> I modified the /etc/rc.conf to have the flag:
> The next reboot of the system caused the /etc/resolv.conf to be
> overwritten with the following contents:
> nameserver 192.168.98.4
> I was baffled with this behaviour and checked /etc/rc.d/resolv script
> and there was no reason as to why "[ ! -e /etc/resolv.conf]" should
> fail at any given instance. Out of curiosity executed "/bin/kenv
> dhcp.domain-name" which returned with the info: kenv: unable to get
> dhcp.domain-name. Would it be fair to assume that /etc/rc.d/resolv
> not to cause the issue?
> What is causing this behaviour? Have I missed something?
> Had a look at network-dhcp.html, and found /etc/dhclient.conf to be
> empty on my system.
> Digging further, was looking at the scripts under /etc/rc.d, found
> /etc/rc.d/named to be another script creating the /etc/resolv.conf and
> this was in the routine named_precmd(). I have not enabled
> 'named_enable' flag in /etc/rc.conf, while it is commented; by
> default; in /etc/defaults/rc.conf file.