diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 567efaff9..6852a0e27 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -473,7 +473,7 @@ sub windows_net_cfg { unless ($mactab) { die "mac table should always exist prior to template processing when doing autoula"; } my $ent = $mactab->getNodeAttribs($node,['mac'],prefetchcache=>1); unless ($ent and $ent->{mac}) { die "missing mac data for $node"; } - my $suffix = $ent->{mac}; + my $suffix = xCAT::Utils->parseMacTabEntry($ent->{mac},$node); my $mac = $suffix; $suffix = lc($suffix); $mac =~ s/:/-/g; @@ -665,7 +665,7 @@ sub esxipv6setup { my $hoststab; my $mactab = xCAT::Table->new('mac',-create=>0); my $ent = $mactab->getNodeAttribs($node,['mac'],prefetchcache=>1); - my $suffix = $ent->{mac}; + my $suffix = xCAT::Utils->parseMacTabEntry($ent->{mac},$node); $suffix = lc($suffix); unless ($mactab) { die "mac table should always exist prior to template processing when doing autoula"; } #in autoula, because ESXi weasel doesn't seemingly grok IPv6 at all, we'll have to do it in %pre @@ -693,7 +693,7 @@ sub kickstartnetwork { unless ($mactab) { $tmplerr ="mac table should always exist prior to template processing when doing autoula"; return;} my $ent = $mactab->getNodeAttribs($node,['mac'],prefetchcache=>1); unless ($ent and $ent->{mac}) { $tmplerr ="missing mac data for $node"; return;} - my $suffix = $ent->{mac}; + my $suffix = xCAT::Utils->parseMacTabEntry($ent->{mac},$node); $suffix = lc($suffix); if ($::XCATSITEVALS{managedaddressmode} eq "autoula") { unless ($hoststab) { $hoststab = xCAT::Table->new('hosts',-create=>1); } @@ -746,7 +746,7 @@ sub yast2network { unless ($mactab) { die "mac table should always exist prior to template processing when doing autoula"; } my $ent = $mactab->getNodeAttribs($node,['mac'],prefetchcache=>1); unless ($ent and $ent->{mac}) { die "missing mac data for $node"; } - my $suffix = $ent->{mac}; + my $suffix = xCAT::Utils->parseMacTabEntry($ent->{mac},$node); $suffix = lc($suffix); if ($::XCATSITEVALS{managedaddressmode} eq "autoula") { #TODO diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 033942f24..05d08fa2d 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -1434,7 +1434,7 @@ sub mkinstall { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { @@ -1447,7 +1447,7 @@ sub mkinstall { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { @@ -1896,7 +1896,7 @@ sub mksysclone { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { @@ -1909,7 +1909,7 @@ sub mksysclone { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { @@ -1963,7 +1963,7 @@ sub mksysclone if ($archref->{arch} eq "ppc64"){ my $mactab = xCAT::Table->new('mac'); my $macref = $mactab->getNodeAttribs($node, ['mac']); - my $formatmac = $macref->{mac}; + my $formatmac = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); $formatmac =~ s/:/-/g; $formatmac = "01-".$formatmac; $kcmdline .= " BOOTIF=$formatmac "; diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 62cc32abd..7318d415a 100755 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -812,7 +812,7 @@ sub mkinstall if ($ent->{installnic} eq "mac"){ my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else{ $ksdev = $ent->{installnic}; @@ -822,7 +822,7 @@ sub mkinstall if ($ent->{primarynic} eq "mac"){ my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else{ $ksdev = $ent->{primarynic}; diff --git a/xCAT-server/lib/xcat/plugins/rhevm.pm b/xCAT-server/lib/xcat/plugins/rhevm.pm index b63a602a3..657c36a3d 100644 --- a/xCAT-server/lib/xcat/plugins/rhevm.pm +++ b/xCAT-server/lib/xcat/plugins/rhevm.pm @@ -579,7 +579,7 @@ sub mkinstall { if ($ent->{installnic} eq "mac") { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { $ksdev = $ent->{installnic}; } @@ -587,7 +587,7 @@ sub mkinstall { if ($ent->{primarynic} eq "mac") { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { $ksdev = $ent->{primarynic}; } diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index ce22e536c..32552732e 100755 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -582,7 +582,7 @@ sub mknetboot # add the kernel-booting parameter: netdev=, or BOOTIF= my $netdev = ""; - my $mac = $machash->{$node}->[0]->{mac}; + my $mac = xCAT::Utils->parseMacTabEntry($machash->{$node}->[0]->{mac},$node); if ($reshash->{$node}->[0] and $reshash->{$node}->[0]->{installnic} and ($reshash->{$node}->[0]->{installnic} ne "mac")) { $kcmdline .= "netdev=" . $reshash->{$node}->[0]->{installnic} . " "; @@ -1115,7 +1115,7 @@ sub mkinstall { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $netdev = $macref->{mac}; + $netdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { @@ -1128,7 +1128,7 @@ sub mkinstall { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $netdev = $macref->{mac}; + $netdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } else { @@ -1463,7 +1463,7 @@ sub mksysclone { my $mactab = xCAT::Table->new("mac"); my $macref = $mactab->getNodeAttribs($node, ['mac']); - $ksdev = $macref->{mac}; + $ksdev = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); } unless ( $ksdev eq "bootif" ) { @@ -1498,7 +1498,7 @@ sub mksysclone if ($archref->{arch} eq "ppc64"){ my $mactab = xCAT::Table->new('mac'); my $macref = $mactab->getNodeAttribs($node, ['mac']); - my $formatmac = $macref->{mac}; + my $formatmac = xCAT::Utils->parseMacTabEntry($macref->{mac},$node); $formatmac =~ s/:/-/g; $formatmac = "01-".$formatmac; $kcmdline .= " BOOTIF=$formatmac ";