fix for bug 3284076: lsdef -S check nodelist table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9276 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2011-04-12 06:32:58 +00:00
parent 7addb849b9
commit 0a0427657c

View File

@ -2732,7 +2732,15 @@ sub defls
if ($type eq "node") {
my %newhash;
my $listtab = xCAT::Table->new( 'nodelist' );
if ($listtab and (!defined($::opt_S)) ) {
if (!$listtab) {
my $rsp;
$rsp->{data}->[0] =
"Could not open nodelist table.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
if (!defined($::opt_S) ) {
#my $tmp1=$listtab->getAllEntries("all");
#if (defined($tmp1) && (@$tmp1 > 0)) {
# foreach(@$tmp1) {
@ -2750,12 +2758,7 @@ sub defls
}
#}
}
}else {
my $rsp;
$rsp->{data}->[0] =
"Could not open nodelist table.";
xCAT::MsgUtils->message("I", $rsp, $::callback);
}
}
}
# Get all the objects of this type