View Issue Details

IDProjectCategoryView StatusLast Update
0006266CentOS-6initscriptspublic2013-02-21 14:51
Status newResolutionopen 
Product Version6.3 
Target VersionFixed in Version 
Summary0006266: ifup-post doesn't add $DNS2 to /etc/resolv.conf if $DNS1 is already set as nameserver
DescriptionThe script /etc/sysconfig/network-scripts does not add "nameserver $DNS2" to /etc/resolv.conf if it already contains "nameserver $DNS1".

The problem is the if statement in l. 29:
if [ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf &&
 tr=$(mktemp /tmp/XXXXXX) ; then

This statement would solve the problem:
if ([ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf) ||
 ([ -n "$DNS2" ] && ! grep -q "^nameserver $DNS2" /etc/resolv.conf) &&
 tr=$(mktemp /tmp/XXXXXX) ; then
Steps To ReproduceModify ifcfg-<if> set DNS1 and DNS2.
Write "nameserver $DNS1" to /etc/resolv.conf
service network restart
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2013-02-21 14:51 dnt New Issue