Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 66202 - dhcpcd overwrites /etc/resolv.conf even with PEERDNS=no
dhcpcd overwrites /etc/resolv.conf even with PEERDNS=no
Product: Red Hat Linux
Classification: Retired
Component: dhcpcd (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-06-06 00:08 EDT by Romel Aranas
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-07-07 11:28:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Romel Aranas 2002-06-06 00:08:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (Win98; U)

Description of problem:
Adding PEERDNS=no in ifcfg-eth0 doesn't prevent dhcpcd from overwriting 

To work around the problem, I found that moving the -R in DHCPCDARGS to the 
beginning, instead of at the end, seems to fix the problem.


I changed these lines in ifup:
    if [ "${PEERDNS}" = "no" ]; then
       PUMPARGS="${PUMPARGS} -d"


    if [ "${PEERDNS}" = "no" ]; then
       PUMPARGS="${PUMPARGS} -d"
       DHCPCDARGS="-R ${DHCPCDARGS}"  <== I moved the -R to the front

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

How reproducible:

Steps to Reproduce:
1. Put PEERDNS=no in /etc/sysconfig/network-scripts/ifcfg-eth0
2. Make some proprietary changes to /etc/resolv.conf
3. /etc/rc.d/init.d/network restart

Actual Results:  /etc/resolv.conf is overwritten with new info from dhcpcd.

Expected Results:  /etc/resolv.conf should not have been changed.

Additional info:

My version of initscripts is 5.83-1.
Comment 1 Bill Nottingham 2002-06-06 11:16:45 EDT
Sounds like a bug in dhcpcd argument parsing; does the version in 7.3 fare better?

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