Bug 178045 - dhcleint-script overwrites custom resolv.conf
Summary: dhcleint-script overwrites custom resolv.conf
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-17 16:14 UTC by Jeff Armstrong
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-17 16:29:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeff Armstrong 2006-01-17 16:14:51 UTC
Description of problem: dhclient-script overwrites custom resolv.conf file. 
Server uses dhcp external interface and static internal interfaces.  We use
internal dns.  dhclient-script overwrites search and domain with external
information.


Version-Release number of selected component (if applicable): FC4 and higher


How reproducible: restart network when address is obtained it will overwrite file


Additional info:  It would be nice if there was a settings file or something
besides editing out the dhclient-script. Or have the rpm save the file as rpmnew
instead of overwriting changes.  I know it's minor.  But i'm guessing there is
more than just me with this problem.

Comment 1 Jason Vas Dias 2006-01-17 16:29:59 UTC
There are many ways to customize the dhclient-script's modification of 
resolv.conf:

o  Disable resolv.conf modification entirely - set
   'PEERDNS=no'
   in /etc/sysconfig/network, or /etc/sysconfig/network-scripts/ifcfg-${IF}

OR

o  Change the domain-name or domain-name-servers dhcp options in 
   /etc/dhclient.conf (see man dhclient.conf(5)) with the 'prepend',
   'append', or 'supersede' directives - e.g.:
     'supersede domain-name-servers W.X.Y.Z;'
   will replace any nameservers received from dhcp with W.X.Y.Z .
   If dhclient-${interface}.conf exists for the $interface being configured,
   it will override any existing global dhclient.conf.

OR

o  Create an /etc/dhclient-up-hooks script, that will be sourced before
   dhclient writes resolv.conf, so you can change dhcp option settings 
   before they are written:
     '...new_domain_name_servers=$my_nameserver;...'
   See 'man dhclient-script' for details on the dhclient hooks scripts.

In short, dhclient-script is NOT a %config file and should never need to
be modified by end users, and there are many methods provided to customize its
operation, so this is 'NOTABUG'. If you still have problems, let me know .
Thank you!


Note You need to log in before you can comment on or make changes to this bug.