Bug 158146 - PEERDNS setting gets ignored
Summary: PEERDNS setting gets ignored
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-19 02:46 UTC by Mate Wierdl
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-06-01 21:35:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mate Wierdl 2005-05-19 02:46:10 UTC
Description of problem:

PEERDNS=no setting gets ignored

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

dhclient-3.0.1-42_FC3
How reproducible:

Always


Steps to Reproduce:
1. set PEERDNS=no
2. run dhclient-script
3. check that the PEERDNS setting got ignored (new /etc/resolve.conf gets created)
  
Actual results:


Expected results:


Additional info:

The problem is the double "==" in 

if [ "${PEERDNS}" == "no" ]; then

Change it to 

if [ "${PEERDNS}" = "no" ]; then

Comment 1 Mate Wierdl 2005-05-19 02:49:05 UTC
meant /etc/resolv.conf

Comment 2 Jason Vas Dias 2005-05-31 20:48:13 UTC
I cannot reproduce this problem.
While the 
  if [ "${PEERDNS}" == "no" ]; then
clause might be sloppy "C-programmer" shell programming,
it does in fact work, and the bash man-page section on
"CONDITIONAL EXPRESSIONS" states :
"
    string1 == string2
              True if the strings are equal.  
              = may be used in place of == for strict POSIX
              compliance.
". 
This clause has remained unchanged in dhclient-script since
dhcp-3.0pl1 in RHL-8.0 .

When I put "PEERDNS=no" in /etc/sysconfig/network-scripts/ifcfg-eth0,
and then do "ifdown eth0; ifup eth0", my resolv.conf remains 
untouched.

Please let me know exactly how you reproduce this problem.
Do you use PPP ? 




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