LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 04-12-2005, 12:56 PM   #1
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,085

Rep: Reputation: 45
/etc/resolv.conf being overwritten...


running slack10 on a DSL, actiontec modem...for whatever reason, the modem passes bad DNS numbers....so i edited my /etc/resolv.conf file with the right ones, and it works great. only problem is, when i reboot, it rewrites resolv.conf with the bad numbers again...is there any way to make it so my /etc/resolv.conf DOESN'T get re-written?

i found this thread which had some suggestions...including an -R flag, but it's not really helping me out, so maybe it's not applicable in slack? any suggestions are greatly appreciated. i know it's not a huge deal to quickly modify the file, but it would be nice to NOT have to do that....

TIA

jay
 
Old 04-12-2005, 01:00 PM   #2
jtshaw
Moderator
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 63
In your rc.inet1 script where it calls dhcpcd add the -R option to it.

-R prevents resolv.conf from being replaced
-N prevents ntp.conf from being replaced
-Y prevents yp.conf from being replaced

See man dhcpcd for more options.


EDIT:
Lines 75 and 78 of the /etc/rc.d/rc.inet1 file are where dhcpcd is actually executed in the default Slackware 10.1 configuration. That is where you will need to add the -R flag.

Last edited by jtshaw; 04-12-2005 at 01:03 PM.
 
Old 04-12-2005, 01:15 PM   #3
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,085

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by jtshaw
In your rc.inet1 script where it calls dhcpcd add the -R option to it.

-R prevents resolv.conf from being replaced
-N prevents ntp.conf from being replaced
-Y prevents yp.conf from being replaced

See man dhcpcd for more options.


EDIT:
Lines 75 and 78 of the /etc/rc.d/rc.inet1 file are where dhcpcd is actually executed in the default Slackware 10.1 configuration. That is where you will need to add the -R flag.
i've added the -R flag as such:
Code:
/sbin/dhcpcd  -d -t 10 -h  ${DHCP_HOSTNAME[$1]} eth${1} -R
Code:
 /sbin/dhcpcd  -d -t 10 eth${1} -R
but when i reboot, it doesn't create the /etc/resolv.conf file...do i need to manually create it? or am i adding the -R flag in the wrong place....
 
Old 04-12-2005, 01:26 PM   #4
jtshaw
Moderator
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 63
You will need to create it manually.
 
Old 04-12-2005, 01:42 PM   #5
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,085

Original Poster
Rep: Reputation: 45
it worked!!! thanks so much, shaw...
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xorg.conf is overwritten at bootup edfinegan Fedora 3 10-15-2004 04:41 PM
Resolv.conf Overwritten jlcarmic Debian 2 05-27-2004 08:14 AM
resolv.conf overwritten on boot cjpsparks Linux - Networking 1 11-06-2003 02:06 AM
ntp.conf overwritten larand54 Linux - Networking 3 10-08-2003 02:03 AM
resolv.conf overwritten LocHolmez Linux - Networking 2 09-22-2003 09:51 AM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration