From 801f5bbf2e25f8a587b6d4c33614aac5f2fd6e25 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 17 Apr 2009 15:04:43 +0000 Subject: [PATCH] fix bad check causing mknb to run even with /install mounted git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3213 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAsn.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index 794d5a750..5ddd35d26 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -899,17 +899,18 @@ sub setup_TFTP { # read sharedtftp attribute from site table, if exist - my @sharedtftp = xCAT::Utils->get_site_attribute("sharedtftp"); - if (exists($sharedtftp[0])) + my $stab = xCAT::Table->new('site'); + my $sharedtftp = $stab->getAttribs({key=>'sharedtftp'},'value'); + if ($sharedtftp) { - $mountdirectory = $sharedtftp[0]; + $mountdirectory = $sharedtftp->{value}; $mountdirectory =~ tr/a-z/A-Z/; # convert to upper } - + $stab->close; # read tftpdir directory from database my $tftpdir = "/tftpboot"; # default my @tftpdir1 = xCAT::Utils->get_site_attribute("tftpdir"); - if (exists($tftpdir1[0])) + if (defined($tftpdir1[0])) { $tftpdir = $tftpdir1[0]; }