Red Hat Bugzilla – Bug 135091
Can't do DNS request in the %post section if the machine uses DHCP
Last modified: 2007-11-30 17:10:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Description of problem:
I'm doing a kickstart install over network, in interactive mode.
The resulting machine is set up to use DHCP.
The install goes well, but the post-install part fails.
When outside the chroot, the resolv.conf is ok, it does contains
'search' and 'nameserver' entries. But when inside the chroot, thus
where my post-install script is running, the resolv.conf only contains
the 'search' entry, and thus all DNS request are failing and therefore
the post-install script does not run properly.
if workarounded that by adding this at the very beginning of the %post
echo "nameserver ip_of_my_name_server" >> /etc/resolv.conf
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. do a kickstart install over the network, with the resulting machine
set to use DHCP
2. run a chroot'ed post install script that is supposed to do DNS
request (e.g. yum -y update)
Actual Results: chroot'ed post-install script is not able to perform
Expected Results: chroot'ed post-install script is able to perform