Re: etc/resolv.conf gets overwritten with blank file upon boot.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Howarth wrote:

On Tue, 2005-03-08 at 16:38 -0500, Nat Gross wrote:


Paul Howarth wrote:



On Tue, 2005-03-08 at 14:01 -0500, Nat Gross wrote:




Go to /etc/sysconfig/network-scripts and edit the script which sets on
your interface. There shouldn't be any line with DHCP, just comment
them or remove them.






Hmm... I am not that well versed with scripting bash. Also, are these scripts automatically generated? Should I not rather goto the source that causes the script be written? What happens if I turn dhcp on again in the future?




Try this:
$ fgrep BOOTPROTO /etc/sysconfig/network-scripts/ifcfg-*

If any of the resulting output (which might be empty) mentions DHCP then
edit the referenced file and change

BOOTPROTO=dhcp

to

BOOTPROTO=static

Paul.




On both machines, BOOTPROTO is already set to static. (It happens on both FC3 machines.)



Have you ever tried running NetworkManager on either of these machines?
That might do this.


Oops. Sorry, due to being a newbie, I didn't mention that my 'empty' resolv.conf file had one line:
; generated by NetworkManager, do not edit!
(I thought this was always a default empty file.) Evidently I ran this program, but I have no idea what when where!
Furthermore, I noticed today that whilst it overwrote the resolv.conf, at least it made a resolv.conf.bak! But, more interestingly there is also a /etc/resolv.conf.predhclient that *does* have the nameservers correctly (along with the 'do not edit!' line). (The timestamp on the .predhclient file is mar 5th, when I was still on dhcp.)


Could you look at the exact timestamp of the empty resolv.conf file and
compare it with the entries in /var/log/messages
and/or /var/log/boot.log to figure out where in the boot process this
happens?


Hah! You hit the nail on the head. The timestamp of resolv.con is 12:11:05, and here are a few relevant log entries:
Mar 9 12:11:04 xdale NetworkManager: starting...
Mar 9 12:11:05 xdale NetworkManager: running mainloop...
Mar 9 12:11:05 xdale NetworkManager: AUTO: Best wired device = (null), best wireless device = (null) (null)
Mar 9 12:11:05 xdale NetworkManager: NetworkManager startup succeeded


If you do "service network restart" does this happen?



No. The resolv.conf remains as before the network restart.

Paul.


Thanks;
-nat


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux