diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index e44c667de..7d7239545 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -86,7 +86,9 @@ sub setstate { my %machash = %{shift()}; my %nthash = %{shift()}; my $tftpdir = shift; - my %linuximghash = %{shift()}; + my %linuximghash = (); + my $linuximghashref = shift; + if (ref $linuximghashref) { %linuximghash = %{$linuximghashref}; } my $imgaddkcmdline=($linuximghash{'boottarget'})? undef:$linuximghash{'addkcmdline'}; my $kern = $bphash{$node}->[0]; #$bptab->getNodeAttribs($node,['kernel','initrd','kcmdline']); diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index f06208883..42fb1c2cf 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -97,7 +97,9 @@ sub setstate { my %machash = %{shift()}; my %iscsihash = %{shift()}; my $tftpdir = shift; - my %linuximghash = %{shift()}; + my %linuximghash = (); + my $linuximghashref = shift; + if (ref $linuximghashref) { %linuximghash = %{$linuximghashref}; } my $imgaddkcmdline=($linuximghash{'boottarget'})? undef:$linuximghash{'addkcmdline'}; my $kern = $bphash{$node}->[0]; #$bptab->getNodeAttribs($node,['kernel','initrd','kcmdline']); unless ($addkcmdlinehandled->{$node}) { #Tag to let us know the plugin had a special syntax implemented for addkcmdline