Changed $propVals to $propVals->{'mac'} because in the if conditional, $propVals can have a value while $propVals->{'mac'} can be null.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7092 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2010-08-13 23:14:00 +00:00
parent 7a1f81f66c
commit 096339dc5b

View File

@ -1805,7 +1805,7 @@ sub cloneVM {
my $generateNew = 0; # Flag to generate new MACID
@propNames = ('mac');
$propVals = xCAT::zvmUtils->getNodeProps( 'mac', $_, @propNames );
if ( !$propVals ) {
if ( !$propVals->{'mac'} ) {
# If no MACID is found, get one
$macId = xCAT::zvmUtils->getMacID($tgtHcp);
@ -1970,7 +1970,7 @@ sub cloneVM {
my $srcMac;
@propNames = ('mac');
$propVals = xCAT::zvmUtils->getNodeProps( 'mac', $sourceNode, @propNames );
if ($propVals) {
if ($propVals->{'mac'}) {
# Get MAC address
$srcMac = $propVals->{'mac'};