public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
* Fixing /etc/resolv.conf
@ 2005-07-21  5:52 Peter H.
  2005-07-21  7:38 ` Conway S. Smith
  0 siblings, 1 reply; 6+ messages in thread
From: Peter H. @ 2005-07-21  5:52 UTC (permalink / raw)
  To: linux-newbie

Hi,

In slackware the file /etc/resolv.conf is updated on every reboot.

How can I stop that? I tried chattr +i and chmod -w w/o success.

The reason is that the nameserver address which is put into the file on every 
reboot is not the the one I am supposed to use according to the advise from my 
broadband ISP.

Thanks & regards
-- 
Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fixing /etc/resolv.conf
  2005-07-21  5:52 Fixing /etc/resolv.conf Peter H.
@ 2005-07-21  7:38 ` Conway S. Smith
  2005-07-22  1:05   ` Peter
  0 siblings, 1 reply; 6+ messages in thread
From: Conway S. Smith @ 2005-07-21  7:38 UTC (permalink / raw)
  To: Peter H.; +Cc: linux-newbie

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter H. wrote:
> Hi,
> 
> In slackware the file /etc/resolv.conf is updated on every reboot.
> 
> How can I stop that? I tried chattr +i and chmod -w w/o success.
> 
> The reason is that the nameserver address which is put into the file on every 
> reboot is not the the one I am supposed to use according to the advise from my 
> broadband ISP.
> 
> Thanks & regards


Most likely /etc/resolv.conf is being overwritten by the DHCP client
every time you reboot.  In Slackware, edit /etc/rc.d/rc.inet1 so that
when it runs dhcpcd it uses the option -R, which will prevent dhcpcd
from replacing the existing /etc/resolv.conf.

Good luck,
Conway S. Smith
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFC31EIGL3AU+cCPDERAj7yAJ9kbxVaLo9PSJlMlg7ra5m3CQVZZACg7afv
2cFV+FhRQLMUHX+GTLI0+4c=
=wx/F
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fixing /etc/resolv.conf
  2005-07-21  7:38 ` Conway S. Smith
@ 2005-07-22  1:05   ` Peter
  2005-07-22 14:25     ` Richard Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Peter @ 2005-07-22  1:05 UTC (permalink / raw)
  To: linux-newbie

On Thu, 21 Jul 2005 01:38:50 -0600
"Conway S. Smith" <beolach@comcast.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Peter H. wrote:
> > Hi,
> > 
> > In slackware the file /etc/resolv.conf is updated on every reboot.
> > 
> > How can I stop that? I tried chattr +i and chmod -w w/o success.
> > 
> > The reason is that the nameserver address which is put into the file on
every 
> > reboot is not the the one I am supposed to use according to the advise
> >from my  broadband ISP.
> > 
> > Thanks & regards
> 
> 
> Most likely /etc/resolv.conf is being overwritten by the DHCP client
> every time you reboot.  In Slackware, edit /etc/rc.d/rc.inet1 so that
> when it runs dhcpcd it uses the option -R, which will prevent dhcpcd
> from replacing the existing /etc/resolv.conf.

Thanks! It does not work.

-- 
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fixing /etc/resolv.conf
  2005-07-22  1:05   ` Peter
@ 2005-07-22 14:25     ` Richard Adams
  2005-07-23  6:21       ` Peter
  2005-07-24  1:55       ` Peter
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Adams @ 2005-07-22 14:25 UTC (permalink / raw)
  To: Peter; +Cc: linux-newbie

On Friday 22 July 2005 03:05, Peter wrote:
> On Thu, 21 Jul 2005 01:38:50 -0600
>
> "Conway S. Smith" <beolach@comcast.net> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Peter H. wrote:
> > > Hi,
> > >
> > > In slackware the file /etc/resolv.conf is updated on every reboot.
> > >
> > > How can I stop that? I tried chattr +i and chmod -w w/o success.
> > >
> > > The reason is that the nameserver address which is put into the file on
>
> every
>
> > > reboot is not the the one I am supposed to use according to the advise
> > >from my  broadband ISP.
> > >
> > > Thanks & regards
> >
> > Most likely /etc/resolv.conf is being overwritten by the DHCP client
> > every time you reboot.  In Slackware, edit /etc/rc.d/rc.inet1 so that
> > when it runs dhcpcd it uses the option -R, which will prevent dhcpcd
> > from replacing the existing /etc/resolv.conf.
>
> Thanks! It does not work.

When i tryed that option a while ago it worked for me, however you can always 
do things in many different ways with linux, simply make a copy 
of /etc/resolv.conf and edit it to your needs and rename it something like 
resolv.good.
Now place the following in your /etc/rc.d/rc.local file

cp /etc/resolv.good /etc/resolv.conf

rc.local is the last file to be executed which means you now have what you 
want.

I ask myself why you get the wrong info everytime from your dhcp server tho.
Surely its better to solve the problem at the root instead of working around 
it.

Regards Richard.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fixing /etc/resolv.conf
  2005-07-22 14:25     ` Richard Adams
@ 2005-07-23  6:21       ` Peter
  2005-07-24  1:55       ` Peter
  1 sibling, 0 replies; 6+ messages in thread
From: Peter @ 2005-07-23  6:21 UTC (permalink / raw)
  To: pa3gcu; +Cc: linux-newbie

On Fri, 22 Jul 2005 16:25:13 +0200
Richard Adams <pa3gcu@zeelandnet.nl> wrote:

> On Friday 22 July 2005 03:05, Peter wrote:
> > On Thu, 21 Jul 2005 01:38:50 -0600

> > > Peter H. wrote:
> > > > Hi,
> > > >
> > > > In slackware the file /etc/resolv.conf is updated on every reboot.
> > > >
> > > > How can I stop that? I tried chattr +i and chmod -w w/o success.
> > > >
> > > > The reason is that the nameserver address which is put into the file
on
> >
> > every
> >
> > > > reboot is not the the one I am supposed to use according to the advise
> > > >from my  broadband ISP.

> > >
> > > Most likely /etc/resolv.conf is being overwritten by the DHCP client
> > > every time you reboot.  In Slackware, edit /etc/rc.d/rc.inet1 so that
> > > when it runs dhcpcd it uses the option -R, which will prevent dhcpcd
> > > from replacing the existing /etc/resolv.conf.
> >
> > Thanks! It does not work.
> 
> When i tryed that option a while ago it worked for me, however you can
always 
> do things in many different ways with linux, simply make a copy 
> of /etc/resolv.conf and edit it to your needs and rename it something like 
> resolv.good.
> Now place the following in your /etc/rc.d/rc.local file
> 
> cp /etc/resolv.good /etc/resolv.conf

That's what I did. May be I put the -R on the wrong place. I put it at

 eth${1}" | $LOGGER
          /sbin/dhcpcd -d -R -t 10 -h

> 
> I ask myself why you get the wrong info everytime from your dhcp server tho.
> Surely its better to solve the problem at the root instead of working around
> it.

I approached the ISP and was told they will have it fixed coming week.

> Regards Richard.
> 

Regards
-- 
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fixing /etc/resolv.conf
  2005-07-22 14:25     ` Richard Adams
  2005-07-23  6:21       ` Peter
@ 2005-07-24  1:55       ` Peter
  1 sibling, 0 replies; 6+ messages in thread
From: Peter @ 2005-07-24  1:55 UTC (permalink / raw)
  To: pa3gcu; +Cc: linux-newbie

Correction

> "Conway S. Smith" <beolach@comcast.net> wrote:
> > Most likely /etc/resolv.conf is being overwritten by the DHCP client
> > every time you reboot.  In Slackware, edit /etc/rc.d/rc.inet1 so that
> > when it runs dhcpcd it uses the option -R, which will prevent dhcpcd
> > from replacing the existing /etc/resolv.conf.
>
> Thanks! It does not work.

It does work now! Can't understand why it did not work when I first tried it.

--------
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-24  1:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21  5:52 Fixing /etc/resolv.conf Peter H.
2005-07-21  7:38 ` Conway S. Smith
2005-07-22  1:05   ` Peter
2005-07-22 14:25     ` Richard Adams
2005-07-23  6:21       ` Peter
2005-07-24  1:55       ` Peter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox