From 2e0ccb7d7e7bb62529b9a4b3c6c574470d199c29 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 20 Feb 2014 11:35:20 -0500 Subject: [PATCH] more code --- perl-xCAT/xCAT/Zone.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/Zone.pm b/perl-xCAT/xCAT/Zone.pm index e974a366d..b9f93c72a 100644 --- a/perl-xCAT/xCAT/Zone.pm +++ b/perl-xCAT/xCAT/Zone.pm @@ -199,7 +199,8 @@ sub getdefaultzone foreach my $zone (@zones) { # Look for the defaultzone=yes/1 entry if ((defined($zone->{defaultzone})) && - (($zone->{defaultzone} =~ "yes") || ($zone->{defaultzone} eq "1"))) { + (($zone->{defaultzone} =~ /^yes$/i ) + || ($zone->{defaultzone} eq "1"))) { $defaultzone = $zone->{zonename}; } $tab->close(); @@ -279,8 +280,9 @@ sub getzoneinfo $zonehash->{$zonename}->{sshkeydir}= $zone->{sshkeydir}; $zonehash->{$zonename}->{defaultzone}= $zone->{defaultzone}; # find the defaultzone - if ((defined($zone->{defaultzone})) && - (($zone->{defaultzone} =~ "yes") || ($zone->{defaultzone} eq "1"))) { + if ((defined($zone->{defaultzone})) && + (($zone->{defaultzone} =~ /^yes$/i ) + || ($zone->{defaultzone} eq "1"))) { $defaultzone = $zone->{zonename}; } }