Skip to content

Commit

Permalink
Merge pull request #7335 from gurevichmark/mysqlsetup_rh_family
Browse files Browse the repository at this point in the history
Fix mysql setup for RH family of OSes
  • Loading branch information
besawn committed Feb 8, 2023
2 parents 510a4bc + 1a378b3 commit 366c5da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xCAT-client/bin/mysqlsetup
Original file line number Diff line number Diff line change
Expand Up @@ -952,15 +952,15 @@ sub mysqlstart
else
{
if ($::MariaDB == 1) { # running MariaDB
if ( ($::linuxos =~ /rh.*/) || ($::linuxos =~ /sles15.*/) ) {
if ( $::linuxos =~ /rh.*|ol.*|rocky.*|alma.*|sles15.*/) {
$ret = xCAT::Utils->startservice("mariadb");
} else { # sles
$ret = xCAT::Utils->startservice("mysql");
}

} else { # it is mysql

if ($::linuxos =~ /rh.*/)
if ($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/)
{
$ret = xCAT::Utils->startservice("mysqld");
}
Expand Down Expand Up @@ -1063,7 +1063,7 @@ sub mysqlreboot
{
if ($::MariaDB == 1) { # MariaDB not MySQL

if ( ($::linuxos =~ /rh.*/) || ($::linuxos =~ /sles15.*/) ){
if ($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*|sles15.*/) {
$cmd = "chkconfig mariadb on";
} else { #sles
$cmd = "chkconfig mysql on";
Expand All @@ -1073,7 +1073,7 @@ sub mysqlreboot

}
} else { # mysql
if ($::linuxos =~ /rh.*/)
if ($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/)
{
$cmd = "chkconfig mysqld on";
}
Expand Down Expand Up @@ -1611,7 +1611,7 @@ sub setupODBC
}

# for aix and redhat
if (($::linuxos =~ /rh.*/) || ($::osname eq 'AIX'))
if (($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/) || ($::osname eq 'AIX'))
{
$cmd = "rpm -qa | grep mysql-connector-odbc";
xCAT::Utils->runcmd($cmd, 0);
Expand Down Expand Up @@ -1699,7 +1699,7 @@ sub setupODBC
(my $connstring, my $adminid, my $passwd) = split(/\|/, $output[0]);
(my $database, my $id, my $server) = split(/=/, $connstring);

if (($::linuxos =~ /rh.*/) || ($::osname eq 'AIX'))
if (($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/) || ($::osname eq 'AIX'))
{
$odbcinstfile = "/etc/odbcinst.ini";
$odbcfile = "/etc/odbc.ini";
Expand Down

0 comments on commit 366c5da

Please sign in to comment.