From dad84f2d1a37d398c55ab85ac64f61bdbe609b72 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 20 Feb 2014 07:09:50 -0500 Subject: [PATCH] fix for defect 3985 --- xCAT-server/lib/xcat/plugins/anaconda.pm | 2 +- xCAT-server/lib/xcat/plugins/debian.pm | 6 +++--- xCAT-server/lib/xcat/plugins/pxe.pm | 2 +- xCAT-server/lib/xcat/plugins/toolscenter.pm | 3 ++- xCAT-server/lib/xcat/plugins/vsmppxe.pm | 2 +- xCAT-server/lib/xcat/plugins/xnba.pm | 2 +- xCAT-server/lib/xcat/plugins/yaboot.pm | 3 ++- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 97b1f22e7..1ed0c468e 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 10beafa0d..07b78f8e7 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index 0e69e63d7..31c7fcab7 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -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; diff --git a/xCAT-server/lib/xcat/plugins/toolscenter.pm b/xCAT-server/lib/xcat/plugins/toolscenter.pm index a8ef36118..70c500605 100644 --- a/xCAT-server/lib/xcat/plugins/toolscenter.pm +++ b/xCAT-server/lib/xcat/plugins/toolscenter.pm @@ -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]; } diff --git a/xCAT-server/lib/xcat/plugins/vsmppxe.pm b/xCAT-server/lib/xcat/plugins/vsmppxe.pm index 89e7b1485..46e097522 100644 --- a/xCAT-server/lib/xcat/plugins/vsmppxe.pm +++ b/xCAT-server/lib/xcat/plugins/vsmppxe.pm @@ -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; diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 776c2fb2e..114283c92 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -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; diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index b90c6df25..73cbd6d5e 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -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;