Unix Technical Forum

Stop dhcpcd from writing in resolv.conf

This is a discussion on Stop dhcpcd from writing in resolv.conf within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> At last i've got permanent connection and it is good thing. The bed thing is that my provider use ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 10:33 AM
sebek
 
Posts: n/a
Default Stop dhcpcd from writing in resolv.conf

At last i've got permanent connection and it is good thing.
The bed thing is that my provider use dhcp for the network and has very
slow DNS server. Therefore I want to stop my dhcpcd client deamon from
writing in resolve.conf and set DNS servers by hand but I can't.
dhcpcd is very stubborn.
Any ideas?

I use of course Slack ver 9.1

Sorry for my english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 10:33 AM
Alan Hicks
 
Posts: n/a
Default Re: Stop dhcpcd from writing in resolv.conf

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

In alt.os.linux.slackware, sebek dared to utter,
> Any ideas?


Remove the write permission on /etc/resolv.conf.

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAppQzL3KiNGOqr6ERAieSAKDTnfSE3/VoVY+rrCKOrKMVqB9rCgCffZ1J
ezpkr1VB2hHPJICtkzwlgS4=
=aST+
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 10:33 AM
An Metet
 
Posts: n/a
Default Re: Stop dhcpcd from writing in resolv.conf

NOTE: This message was sent thru a mail2news gateway.
No effort was made to verify the identity of the sender.
--------------------------------------------------------

pgp trash troll delete

Alan Hicks <alan@lizella.network> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1


> In alt.os.linux.slackware, sebek dared to utter,
> > Any ideas?


> Remove the write permission on /etc/resolv.conf.


> - --
> It is better to hear the rebuke of the wise,
> Than for a man to hear the song of fools.
> Ecclesiastes 7:5
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)


> iD8DBQFAppQzL3KiNGOqr6ERAieSAKDTnfSE3/VoVY+rrCKOrKMVqB9rCgCffZ1J
> ezpkr1VB2hHPJICtkzwlgS4=
> =aST+
> -----END PGP SIGNATURE-----





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 10:33 AM
sebek
 
Posts: n/a
Default Re: Stop dhcpcd from writing in resolv.conf

Alan Hicks wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In alt.os.linux.slackware, sebek dared to utter,
>
>>Any ideas?


Yes I tried this but it do nothing. Probably dhcpcd change permitions
for this file and replace it with its own.




> Remove the write permission on /etc/resolv.conf.
>
> - --
> It is better to hear the rebuke of the wise,
> Than for a man to hear the song of fools.
> Ecclesiastes 7:5
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQFAppQzL3KiNGOqr6ERAieSAKDTnfSE3/VoVY+rrCKOrKMVqB9rCgCffZ1J
> ezpkr1VB2hHPJICtkzwlgS4=
> =aST+
> -----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 10:33 AM
buck
 
Posts: n/a
Default Re: Stop dhcpcd from writing in resolv.conf

Alan Hicks <alan@lizella.netWORK> wrote in news:40a69439$1_2@127.0.0.1:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In alt.os.linux.slackware, sebek dared to utter,
>> Any ideas?

>
> Remove the write permission on /etc/resolv.conf.


Naah, Alan. This is right:

edit /etc/rc.d/rc.inet1

in the dhcpcd line(s), put " -R " somewhere in that line

Mine looks like this:
/sbin/dhcpcd -G -I "MY:MA:CAD:RE:SS" -R\
-s the.ip.i.want -t 30 -d eth${1}

man dhcpcd

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 10:33 AM
Richard Adams
 
Posts: n/a
Default Re: Stop dhcpcd from writing in resolv.conf

On Sat, 15 May 2004 17:05:45 -0500, Alan Hicks wrote:

> Remove the write permission on /etc/resolv.conf.


The writer of dhcpcd hardcoded the -R option for people who dont want to
have thier resolv.conf overwritten, so start dhcpcd with the -R option.

Slackware starts dhcpcd in /etc/rc.d/rc.init1 so change;

/sbin/dhcpcd -t 10 ${DHCP_HOSTNAME} -d eth0
to something like;
/sbin/dhcpcd -t -R 10 ${DHCP_HOSTNAME} -d eth0

--
If the Linux community is a bunch of thieves because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 10:33 AM
=?UTF-8?B?0JTQsNC80ZjQsNC9INCT0LXQvtGA0LPQuNC10LLRgdC60Lg=?=
 
Posts: n/a
Default Re: Stop dhcpcd from writing in resolv.conf

sebek wrote:

> At last i've got permanent connection and it is good thing.
> The bed thing is that my provider use dhcp for the network and has very
> slow DNS server. Therefore I want to stop my dhcpcd client deamon from
> writing in resolve.conf and set DNS servers by hand but I can't.
> dhcpcd is very stubborn.


This one is from "man dhcpcd"

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


--
дамјан

Speak softly and carry a cellular phone.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com