Bug 66202 - dhcpcd overwrites /etc/resolv.conf even with PEERDNS=no
Summary: dhcpcd overwrites /etc/resolv.conf even with PEERDNS=no
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dhcpcd
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-06 04:08 UTC by Romel Aranas
Modified: 2007-04-18 16:43 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-07-07 15:28:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Romel Aranas 2002-06-06 04:08:10 UTC
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 15:16:45 UTC
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.