LinuxQuestions.org
Help answer threads with 0 replies.
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 05-26-2004, 11:56 AM   #1
jlcarmic
LQ Newbie
 
Registered: May 2004
Distribution: Debian, Knoppix
Posts: 5

Rep: Reputation: 0
Resolv.conf Overwritten


So I used the business card version of the beta 4 installer for debian. The install is happy, and I choose dhclient during the tasksel part of things. I have two systems with this same issue. One is set for static IP the other dynamic. Each gives me resolving host name issues. I add the appropriate lines into resolv.conf but it is overwritten on each restart.

I have seen this issue on other lists and tried tweaking dhclient-script and dhclient.conf as suggested. No luck. I even tried the solution of stripping write access to the file from everyone. On restart the permissions have been changed so that root has write access again and the file has been overwritten again.

Anyone less confused than me on this one?

JC

--edit--
If it helps, I just did a reinstall and this time did not select the Broadband package in tasksel. Everything works wonderfully now. Guess it is something in there. So now everything works, but knowing what was the issue is still nice.

Last edited by jlcarmic; 05-26-2004 at 12:30 PM.
 
Old 05-26-2004, 09:23 PM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
You can add a script at startup which make:
rm /etc/resolv.conf
cp /etc/resolv.conf.thegoodone /etc/resolv.conf
 
Old 05-27-2004, 08:14 AM   #3
jlcarmic
LQ Newbie
 
Registered: May 2004
Distribution: Debian, Knoppix
Posts: 5

Original Poster
Rep: Reputation: 0
Fixed Resolv.conf overwrite issue

Thank you for the reply. I was looking for more a reason why rather than a workaround, though workaround ideas are always useful. Below is an email I got from one of the resolvconf guys on the debian bugs list explaining what the problem may be:

John wrote:

>> I add the appropriate lines into resolv.conf but it is overwritten on
>> each restart.

Joshua replied:

>> This smells like the resolvconf package screwing things up. Resolvconf
>> folks, feel free to reassign this back if you think this isn't your
>> problem...


First let me point out that if you have resolvconf installed then
you should not make manual changes to the resolver configuration
file because the file is automatically generated. You can indeed
control what goes into the automatically generated file, but only
by modifying the sources that are used to generate it. See
resolvconf(8) for instructions.

Note, however, that resolvconf never writes to /etc/resolv.conf
directly. It sets up a symlink from /etc/resolv.conf to
/etc/resolvconf/run/resolv.conf and then writes to the latter file.
So if /etc/resolv.conf (itself, not its target) is being overwritten
then resolvconf is not the culprit. There are lots of packages out
there that futz with resolv.conf. One of my chief occupations during
the past year has been hunting down all these packages and getting
them to disable their trickery when resolvconf is installed. One
package that slipped through the cracks until recently was
dhcp-client, as discussed in #248399.

To summarize #248399: until recently dhcp-client lacked resolvconf
support. (Support was not added because it was expected that
dhcp-client would be replaced by what is currently dhcp3-client.
dhcp3-client has had resolvconf support for a long time. However,
dhcp3-client never became dhcp-client and the installer is still
installing dhcp-client.) Prior to the addition of resolvconf
support, dhclient-script wrote directly to /etc/resolv.conf.

echo search $new_domain_name >/etc/resolv.conf
echo nameserver $nameserver >>/etc/resolv.conf

Resolvconf's postinst sets up

/etc/resolv.conf -> /etc/resolvconf/run/resolv.conf

so with resolvconf installed, dhclient-script's information ended
up in /etc/resolvconf/run/resolv.conf and was promptly overwritten
by resolvconf.

The solution to #248399 was to add resolvconf support to
dhcp-client. This was done in dhcp-client version 2.0pl5-17 which
was uploaded on 16 May 2004. That version hasn't made it into
testing yet.

With resolvconf support added, dhclient-script sends its information
to resolvconf if it sees that resolvconf is installed and this
information gets merged into the automatically generated file.

John: I would appreciate it if you would check to make
sure that this bug has been fixed. Install the broadband task
again and upgrade dhcp-client to the latest from unstable. Your
resolv.conf should be updated automagically.

I am closing #251066 with this message, but please reopen it if
it turns out that there is still a bug somewhere.
--
Thomas Hood

So I installed unstable which gave me the dhcp3 version of things and everything is happy in debian land again.
 
  


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
/etc/resolv.conf being overwritten... detpenguin Slackware 4 04-12-2005 01:42 PM
xorg.conf is overwritten at bootup edfinegan Fedora 3 10-15-2004 04:41 PM
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

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

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