2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

fix issue:[Customer]a network configuration of interface named bootnic will be created on CN when the site.managedaddressmode=static #1837

This commit is contained in:
immarvin 2016-09-14 10:34:30 -04:00
parent e324a58652
commit 2298d9eb24

View File

@ -1530,16 +1530,15 @@ sub mkinstall
if (xCAT::Utils->version_cmp($kversion, "7.0") < 0) {
$kcmdline .= " ip=$ipaddr netmask=$netmask gateway=$gateway hostname=$hostname ";
} else {
unless ($nicname) {
$nicname = "bootnic";
my $mactab = xCAT::Table->new("mac");
my $macref = $mactab->getNodeAttribs($node, ['mac']);
my $mac = xCAT::Utils->parseMacTabEntry($macref->{mac}, $node);
$kcmdline .= " ifname=$nicname:$mac";
$kcmdline .= " ip=$ipaddr" . "::" . "$gateway" . ":" . "$netmask" . ":" . "$hostname" . ":";
if($nicname){
$kcmdline .= "$nicname";
}
$kcmdline .= " ip=$ipaddr" . "::" . "$gateway" . ":" . "$netmask" . ":" . "$hostname" . ":" . "$nicname" . ":" . "none";
$kcmdline .= " bootdev=$nicname ";
$kcmdline .=":none::";
if($net_params->{mac}){
$kcmdline .="$net_params->{mac}";
}
}
my %nameservers = %{ xCAT::NetworkUtils->getNodeNameservers([$node]) };