correct the dns configuration during node provision when unicast dhcp is enabled

This commit is contained in:
immarvin 2014-05-09 02:02:45 -07:00
parent b94432d9f1
commit ed76d20ea9
3 changed files with 21 additions and 10 deletions

View File

@ -1183,11 +1183,19 @@ sub mkinstall
}
if(scalar @nameserversIP){
$kcmdline .=" dns=".join(",",@nameserversIP);
$kcmdline .=" Nameserver=".join(",",@nameserversIP);
}
my $nd = xCAT::NetworkUtils->getNodeDomains([$node]);
my %nodedomains = %$nd;
my $domain=$nodedomains{$node};
$kcmdline .=" Domain=$domain ";
}
if (defined $sent->{serialport})
{

View File

@ -1,16 +1,8 @@
#
# Setup hostname and resov.conf
# Setup hostname
#
echo "post scripts" >/root/post.log
#there is no network option to set dns search domain in kickstart file,
#the search domain in /etc/resolv.conf is set in the post installation script
export MANAGEDADDRESSMODE=#MANAGEDADDRESSMODE#
export SEARCHDOMAIN=#GETNODEDOMAIN:THISNODE#
if [ "$MANAGEDADDRESSMODE" == "static" ]; then
echo "search $SEARCHDOMAIN" >> /etc/resolv.conf
fi
export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic#
if [ "$PRINIC" == "mac" ]

View File

@ -14,6 +14,17 @@ if [ -r /tmp/updates/etc/pki/tls/certs/ca-bundle.crt ]; then
fi
#there is no boot option to set dns search domain in kickstart file,
#the search domain in /etc/resolv.conf is set in the pre installation script
export MANAGEDADDRESSMODE=#MANAGEDADDRESSMODE#
export SEARCHDOMAIN=#GETNODEDOMAIN:THISNODE#
if [ "$MANAGEDADDRESSMODE" == "static" ]; then
echo "#appended by %pre " >> /etc/resolv.conf
echo "search $SEARCHDOMAIN" >> /etc/resolv.conf
fi
cat >/tmp/baz.py <<EOF
#!/usr/bin/python