Red Hat Bugzilla – Bug 54975
netconfig --nameserver doesn't work
Last modified: 2008-05-01 11:38:01 EDT
From Bugzilla Helper:
Description of problem:
Upon a "netconfig -?", --nameserver=STRING is showed as an option to
specify the nameserver for an interface. However, instead of adding the
appropriate DNS1 entry to ifcfg-ethN, it doesn't seem to do anything.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run /usr/sbin/netconfig --device=eth0 --ip=184.108.40.206 --
netmask=255.255.255.0 --gateway=220.127.116.11 --nameserver=18.104.22.168
2. ifdown/ifup interface
3. Note that /etc/resolv.conf does not have a "nameserver" entry, since
DNS1 is not specified in /etc/sysconfig/network-scripts/ifcfg-eth0.
Actual Results: The nameserver I specified is not available (no DNS1
entry in ifcfg-eth0)
Expected Results: As a result of the above command, ifcfg-eth0 should
have the line
--nameserver doesn't seem to work as advertised in the netconfig Usage
(as a side note, netconfig was not available as a Component choice in
Bugzilla, even though it has been broken out from the pump package --
this should probably be added)
Attaching patch and source rpm with fixes for this bug.
Created attachment 47481 [details]
Patches net.c to allow use of --nameserver option...basically just calls writeResolvConf for the netdev struct
Created attachment 47482 [details]
SRPM with patch already included in spec file
Confirmed fix works.
Fix confirmed above, closing.