fix for defect 3985

This commit is contained in:
lissav 2014-02-20 07:09:50 -05:00
parent accf4fe1e3
commit dad84f2d1a
7 changed files with 11 additions and 9 deletions

View File

@ -63,7 +63,7 @@ sub preprocess_request
my @ents = xCAT::TableUtils->get_site_attribute("sharedtftp");
my $site_ent = $ents[0];
unless ( defined($site_ent)
and ($site_ent =~ /no/i or $site_ent =~ /0/))
and ($site_ent eq "no" or $site_ent eq "NO" or $site_ent eq "0"))
{
#unless requesting no sharedtftp, don't make hierarchical call

View File

@ -75,9 +75,9 @@ sub preprocess_request
my $stab = xCAT::Table->new('site');
my $sent;
($sent) = $stab->getAttribs({key => 'sharedtftp'}, 'value');
unless ( $sent
and defined($sent->{value})
and ($sent->{value} =~ /no/i or $sent->{value} =~ /0/))
unless ( $sent
and defined($sent->{value})
and ($sent->{value} eq "no" or $sent->{value} eq "NO" or $sent->{value} eq "0"))
{
#unless requesting no sharedtftp, don't make hierarchical call

View File

@ -328,7 +328,7 @@ sub preprocess_request {
#my $sent = $stab->getAttribs({key=>'sharedtftp'},'value');
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
my $t_entry = $entries[0];
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
# check for computenodes and servicenodes from the noderange, if so error out
my @SN;
my @CN;

View File

@ -68,9 +68,10 @@ sub preprocess_request
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
my $t_entry = $entries[0];
unless ( defined($t_entry)
and ($t_entry =~ /no/i or $t_entry =~ /0/))
and ($t_entry eq "no" or $t_entry eq "NO" or $t_entry eq "0"))
{
#unless requesting no sharedtftp, don't make hierarchical call
return [$req];
}

View File

@ -260,7 +260,7 @@ sub preprocess_request {
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
my $t_entry = $entries[0];
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
# check for computenodes and servicenodes from the noderange, if so error out
my @SN;
my @CN;

View File

@ -348,7 +348,7 @@ sub preprocess_request {
#they specify no sharedtftp in site table
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
my $t_entry = $entries[0];
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
# check for computenodes and servicenodes from the noderange, if so error out
my @SN;
my @CN;

View File

@ -379,7 +379,8 @@ sub preprocess_request {
#if they specify no sharedtftp in site table
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
my $t_entry = $entries[0];
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
# check for computenodes and servicenodes from the noderange, if so error out
my @SN;
my @CN;