diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index edf491639..2042514c7 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -42,7 +42,8 @@ sub check_dhcp { } sub _slow_get_tftpdir { #make up for paths where tftpdir is not passed in - my $nrtab = = xCAT::Table->new('noderes',-create=>0); #in order to detect per-node tftp directories + my $node = shift; + my $nrtab = xCAT::Table->new('noderes',-create=>0); #in order to detect per-node tftp directories unless ($nrtab) { return $globaltftpdir; } my $ent = $nrtab->getNodeAttribs($node,["tftpdir"]); if ($ent and $ent->{tftpdir}) { diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 1fed7d27d..bc9f339ef 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -43,7 +43,8 @@ sub check_dhcp { } sub _slow_get_tftpdir { #make up for paths where tftpdir is not passed in - my $nrtab = = xCAT::Table->new('noderes',-create=>0); #in order to detect per-node tftp directories + my $node=shift; + my $nrtab = xCAT::Table->new('noderes',-create=>0); #in order to detect per-node tftp directories unless ($nrtab) { return $globaltftpdir; } my $ent = $nrtab->getNodeAttribs($node,["tftpdir"]); if ($ent and $ent->{tftpdir}) { diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index 986cf9c26..79b2f41c3 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -44,7 +44,8 @@ sub check_dhcp { } sub _slow_get_tftpdir { #make up for paths where tftpdir is not passed in - my $nrtab = = xCAT::Table->new('noderes',-create=>0); #in order to detect per-node tftp directories + my $node = shift; + my $nrtab = xCAT::Table->new('noderes',-create=>0); #in order to detect per-node tftp directories unless ($nrtab) { return $globaltftpdir; } my $ent = $nrtab->getNodeAttribs($node,["tftpdir"]); if ($ent and $ent->{tftpdir}) {