LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-19-2013, 08:36 AM   #1
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
How to Prevent WICD Overwriting /etc/resolv.conf


Got this lap top. It's configured (like all my servers) with fixed-IP (it's normally connected with Ethernet). When it's "on the road," it's connected with wi-fi and that blasted thing overwrites /etc/resolv.conf.

I have these un-commented in /etc/rc.d/rc.inet1.conf:
Code:
DHCP_KEEPRESOLV[4]="yes"       # If you don't want /etc/resolv.conf overwritten
DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
Is there some setting I've missed somewhere? I keep a /etc/resolv.conf.bak that I copy over /etc/resolv.conf to get the DNS server addresses after connecting with WICD (and the file gets wiped) which is annoying but not fatal and I'd really like to stop having to do that.

Any hints? Some setting I've missed somewhere or other?
 
Old 12-19-2013, 08:52 AM   #2
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
I had this same problem with /etc/resolv.conf and /etc/hosts. There probably is (or should be) a way to configure it to not overwrite these files, but I gave up and ended up just marking them as immutable:

Code:
chattr +i /etc/resolv.conf
If anyone has a better way of doing it, please share!
 
Old 12-19-2013, 09:13 AM   #3
Cesare
Member
 
Registered: Jun 2010
Posts: 65

Rep: Reputation: 113Reputation: 113
The change in your /etc/resolv.conf is made by dhcpcd which gets invoked by wicd. If you want to keep your own resolv.conf, simply add "nohook resolv.conf" to /etc/dhcpcd.conf. If you'd rather prefer having a customized resolv.conf, have a look at /lib/dhcpcd and the dhcpcd man pages.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent VPNC from overwriting /etc/resolv.conf ALInux Linux - Software 1 08-26-2011 07:37 AM
Something is overwriting my /etc/resolv.con cov Linux - Networking 5 02-20-2010 03:23 PM
Prevent make install from overwriting ahtoot Linux - Newbie 2 04-22-2008 11:29 PM
DHCP client overwriting resolv.conf... how to stop it? gauge73 Linux - Networking 6 05-04-2005 11:51 AM
How to prevent MDK 10 from updating /etc/resolv.conf on every boot Ph0enix2003 Mandriva 0 06-18-2004 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration