primarynic and installnic can be set to mac address
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5344 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
104f305687
commit
139f1c0303
@ -776,18 +776,47 @@ sub mkinstall
|
||||
if ($maxmem) {
|
||||
$kcmdline.=" mem=$maxmem";
|
||||
}
|
||||
my $ksdev = "";
|
||||
if ($ent->{installnic})
|
||||
{
|
||||
$kcmdline .= " ksdevice=" . $ent->{installnic};
|
||||
if ($ent->{installnic} eq "mac")
|
||||
{
|
||||
my $mactab = xCAT::Table->new("mac");
|
||||
my $macref = $mactab->getNodeAttribs($node, ['mac']);
|
||||
$ksdev = $macref->{mac};
|
||||
}
|
||||
else
|
||||
{
|
||||
$ksdev = $ent->{installnic};
|
||||
}
|
||||
}
|
||||
elsif ($ent->{primarynic})
|
||||
{
|
||||
$kcmdline .= " ksdevice=" . $ent->{primarynic};
|
||||
if ($ent->{primarynic} eq "mac")
|
||||
{
|
||||
my $mactab = xCAT::Table->new("mac");
|
||||
my $macref = $mactab->getNodeAttribs($node, ['mac']);
|
||||
$ksdev = $macref->{mac};
|
||||
}
|
||||
else
|
||||
{
|
||||
$ksdev = $ent->{primarynic};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$kcmdline .= " ksdevice=eth0";
|
||||
$ksdev = "eth0";
|
||||
}
|
||||
if ($ksdev eq "")
|
||||
{
|
||||
$callback->(
|
||||
{
|
||||
error => ["No MAC address defined for " . $node],
|
||||
errorcode => [1]
|
||||
}
|
||||
);
|
||||
}
|
||||
$kcmdline .= " ksdevice=" . $ksdev;
|
||||
|
||||
#TODO: dd=<url> for driver disks
|
||||
if (defined($sent->{serialport}))
|
||||
|
@ -653,18 +653,47 @@ sub mkinstall
|
||||
}
|
||||
else
|
||||
{
|
||||
my $netdev = "";
|
||||
if ($ent->{installnic})
|
||||
{
|
||||
$kcmdline .= " netdevice=" . $ent->{installnic};
|
||||
if ($ent->{installnic} eq "mac")
|
||||
{
|
||||
my $mactab = xCAT::Table->new("mac");
|
||||
my $macref = $mactab->getNodeAttribs($node, ['mac']);
|
||||
$netdev = $macref->{mac};
|
||||
}
|
||||
else
|
||||
{
|
||||
$netdev = $ent->{installnic};
|
||||
}
|
||||
}
|
||||
elsif ($ent->{primarynic})
|
||||
{
|
||||
$kcmdline .= " netdevice=" . $ent->{primarynic};
|
||||
if ($ent->{primarynic} eq "mac")
|
||||
{
|
||||
my $mactab = xCAT::Table->new("mac");
|
||||
my $macref = $mactab->getNodeAttribs($node, ['mac']);
|
||||
$netdev = $macref->{mac};
|
||||
}
|
||||
else
|
||||
{
|
||||
$netdev = $ent->{primarynic};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$kcmdline .= " netdevice=eth0";
|
||||
$netdev = "eth0";
|
||||
}
|
||||
if ($netdev eq "") #why it is blank, no mac defined?
|
||||
{
|
||||
$callback->(
|
||||
{
|
||||
error => ["No mac.mac for $node defined"],
|
||||
errorcode => [1]
|
||||
}
|
||||
);
|
||||
}
|
||||
$kcmdline .= " netdevice=" . $netdev;
|
||||
}
|
||||
|
||||
#TODO: driver disk handling should in SLES case be a mod of the install source, nothing to see here
|
||||
|
Loading…
x
Reference in New Issue
Block a user