LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-26-2004, 11:25 AM   #1
hraposo
Member
 
Registered: Aug 2004
Posts: 370

Rep: Reputation: 30
resolv.conf file


How I put a nameserver in resolv.config, that's is not change any time I reboot the machine, in debian?
How can I deny that the machine change what I write in resolv.conf file?
 
Old 12-26-2004, 11:45 AM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
A workaround can be:
You put in rc.local a command which copy a working resolv.conf.whatever to resolv.conf.
Rc.local don't exist in Debian, but you can create it easily.
 
Old 12-26-2004, 12:26 PM   #3
hraposo
Member
 
Registered: Aug 2004
Posts: 370

Original Poster
Rep: Reputation: 30
and where I create this rc.local?
and what kind of commands I put in this file?
 
Old 12-26-2004, 12:54 PM   #4
hraposo
Member
 
Registered: Aug 2004
Posts: 370

Original Poster
Rep: Reputation: 30
I create a file in home with name
resolv.config
nameserver 194.65.100.117
nameserver 194.65.5.2

that I create anather file executable with name
dns (whit this commands:
###script para dns###
rm -rf /etc/resolv.conf
cp /home/helder/resolv.conf /etc/

when I do as #./dns the resolv.conf change, and all works

Now, where I create rc.local to automatize that
 
Old 12-26-2004, 06:50 PM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Create a file /etc/init.d/local, with this inside:
#!/bin/sh

then
chmod 755 /etc/init.d/local
update-rc.d local start 98 2 3 4 5 . <--- don't forget the dot
mkdir /etc/rc.d/
ln -s /etc/init.d/local /etc/rc.d/rc.local

Tested and approved.
Lamed from here:
http://www.trustonme.net/didactels/81.html#local
 
Old 12-27-2004, 05:22 AM   #6
aexl
LQ Newbie
 
Registered: Dec 2004
Distribution: Debian Sarge, LFS
Posts: 1

Rep: Reputation: 0
I had the same problem. I think it was bootscript that had overwritten the resolv.conf file everytime I started the system.
 
  


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
resolv.conf albundy Linux - Software 5 12-14-2004 03:12 PM
problem with resolv.conf file romel Linux - Networking 1 07-23-2004 11:49 AM
how and where to edit the resolv.conf file? apu95 Linux - Wireless Networking 3 05-05-2004 11:10 PM
Mandrake 9.2, 80.11b Wireless Card, resolv.conf file? ImpiousPunk Linux - Newbie 2 11-24-2003 05:31 PM
resolv.conf dnsbum Linux - Networking 1 10-21-2003 12:00 PM

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

All times are GMT -5. The time now is 01:49 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