2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 19:52:03 +00:00

Merge pull request #6936 from gurevichmark/perl_compare

Use correct Perl string compare operator
This commit is contained in:
besawn 2021-04-06 13:36:28 -04:00 committed by GitHub
commit a87eaae09a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -152,7 +152,7 @@ $::linuxos = xCAT::Utils->osver();
my $sp1flag;
# if linuxos==sles12
if ($::linuxos == "sles12") {
if ($::linuxos eq "sles12") {
# open /etc/os-release
my @lines;
@ -930,7 +930,7 @@ sub initmysqldb
$cmd = "$sqlcmd --user=mysql";
#on rhels7.7, /usr/bin/mysql_install_db requires /usr/libexec/resolveip,
#but it's available at the /usr/bin/resolveip
if ($::linuxos == "rhels7.7") {
if ($::linuxos eq "rhels7.7") {
my $resolveip="/usr/libexec/resolveip";
if (!(-x ($resolveip))) {
my $linkcmd="ln -s /usr/bin/resolveip $resolveip";

View File

@ -62,7 +62,7 @@ sub do_main_job {
#check if all xcat daemons are running
($rst, $flag) = check_all_xcat_daemons(\$checkpoint, \@error);
print_check_result($checkpoint, $flag, $rst, \@error);
$rst = 0 if ($flag == "w");
$rst = 0 if ($flag eq "w");
return $rst if ($rst);
#check if xcatd can receive request
@ -89,13 +89,13 @@ sub do_main_job {
#check important directory
($rst, $flag) = check_directory(\%sitetable, \$checkpoint, \@error);
print_check_result($checkpoint, $flag, $rst, \@error);
$rst = 0 if ($flag == "w");
$rst = 0 if ($flag eq "w");
$rc |= $rst;
#check if SElinux is disabled
($rst, $flag) = check_selinux(\$checkpoint, \@error);
print_check_result($checkpoint, $flag, $rst, \@error);
$rst = 0 if ($flag == "w");
$rst = 0 if ($flag eq "w");
$rc |= $rst;
#check http service
@ -106,7 +106,7 @@ sub do_main_job {
#check tftp service
($rst, $flag) = check_tftp_service($installnicip, \$checkpoint, \@error);
print_check_result($checkpoint, $flag, $rst, \@error);
$rst = 0 if ($flag == "w");
$rst = 0 if ($flag eq "w");
$rc |= $rst;
#check DNS service
@ -310,7 +310,7 @@ sub check_all_xcat_daemons {
foreach my $daemon (@daemon_list) {
my $counter = $output =~ s/$daemon/$daemon/g;
if ($counter > 1) {
if ($daemon == "SSL listener") {
if ($daemon eq "SSL listener") {
my $cur_pid = `cat /var/run/xcatd.pid`;
my @ssl_pids = `ps aux 2>&1|grep -v grep|grep "xcatd: $daemon"|awk -F' ' '{print \$2}'`;
foreach my $ssl_pid (@ssl_pids) {

View File

@ -1496,7 +1496,7 @@ sub parse_args {
# Updateid was passed, check flags allowed with update id
if ($option_flag !~ /^--delete$|^-a$|^--activate$/) {
my $optional_help_msg = "";
if ($option_flag == "-d") {
if ($option_flag eq "-d") {
# For this special case, -d was changed to pass in a directory.
$optional_help_msg = "Did you mean --delete?"
}