LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2001, 11:18 PM   #1
tristan_vdv
LQ Newbie
 
Registered: Nov 2001
Location: Australia
Distribution: RH 7.2
Posts: 17

Rep: Reputation: 0
Resolv.conf


Hi,
I have my linux box (RH7.1) setup with two network cards. one with a fixed IP, the other from a DHCP. My resolv.conf is always updated from the DHCP but I want to change it and not have it been changed back the next time the DHCP lease is renewed.

Is there a way to stop the dhcp software from changing the resolv.conf ?

Thanks
Tristan
 
Old 11-17-2001, 04:04 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I don't know if dhcp(cd) allows you to do this, but it takes the "template" (ie input) from /etc/dhcp/resolv.conf, and places it in /etc.
If you can't make changes stick in /etc/dhcp, you could always revert to adding the immutable bit, but this *could* break things, so YMMV:
"chattr +iu /etc/resolv.conf".
Just remember to work(-/+) the i bit before editing.
 
Old 11-20-2001, 07:49 PM   #3
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
dhcpcd -R

-R Prevents dhcpcd from replacing existing /etc/resolv.conf file.

If you're using Linuxconf or netconfig or whichever to configure you're card, just kill it and stick the line:

/sbin/dhcpcd -R eth0 (or whichever eth) in

/etc/rc.d/rc.local

Cheers,

Finegan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
resolv.conf albundy Linux - Software 5 12-14-2004 04:12 PM
resolv.conf jmdlcar Slackware 9 05-15-2004 12:44 PM
resolv.conf ricemark20 Linux - Networking 12 11-11-2003 05:08 PM
resolv.conf dnsbum Linux - Networking 1 10-21-2003 01:00 PM
resolv.conf Culbert Linux - Networking 8 03-20-2003 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:00 AM.

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