Bug 66202 - dhcpcd overwrites /etc/resolv.conf even with PEERDNS=no
dhcpcd overwrites /etc/resolv.conf even with PEERDNS=no
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: dhcpcd (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brock Organ
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2004-07-07 11:28:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 
/etc/resolv.conf.

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.

/etc/sysconfig/network-scripts/ifup:

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

to:

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


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


How reproducible:
Always

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.