get tftpdir using xCAT::Utils->getTftpDir if it is not passed in through subroutine calling

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11673 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2012-02-24 06:55:58 +00:00
parent d7262006c3
commit 98f393d24b

View File

@ -45,6 +45,10 @@ sub check_dhcp {
sub getstate {
my $node = shift;
my $tftpdir = shift;
if (!$tftpdir)
{
$tftpdir = xCAT::Utils->getTftpDir();
}
if (check_dhcp($node)) {
if (-r $tftpdir . "/etc/".$node) {
my $fhand;