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

Added flag to check SLES 12 for SP1, run same flow as Ubuntu

This commit is contained in:
Patrick Lundgren 2015-11-05 15:29:28 -05:00
parent f48fbc39c9
commit 1e68e93938

View File

@ -147,6 +147,28 @@ if ( -e "/etc/debian_version" ){
# determine whether redhat or sles
$::linuxos = xCAT::Utils->osver();
# SLES SP 1
my $sp1flag;
# if linuxos==sles12
if ( $::linuxos == "sles12" ){
# open /etc/os-release
my @lines;
my $relfile;
$sp1flag = 0;
open($relfile,"<","/etc/os-release");
# parse lines
@lines = <$relfile>;
close($relfile);
chomp(@lines);
# if == 12.1
if (grep /VERSION_ID="12.1"/, @lines){
#$::linuxos == "sles12.1";
$sp1flag = 1;
}
}
# set flag
# SLES SP 1
# is this MariaDB or MySQL
$::MariaDB=0;
my $cmd;
@ -202,7 +224,7 @@ if (grep(/$mysqlcheck/, @output))
#for ubuntu 14, after install mysql/maria server, the mysql will running
#need to stop mysql in order to setup init xcat mysql
if ( $::debianflag ){
if ( $::debianflag or $sp1flag ){
$cmd = "pidof mysqld";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0)
@ -950,7 +972,7 @@ sub mysqlstart
{
my @output = xCAT::Utils->runcmd($cmd, 0);
my $mysqlcheck = "--datadir"; # see if really running
if ( $::debianflag ){
if ( $::debianflag or $sp1flag ){
$mysqlcheck = "mysqld";
}
if (grep(/$mysqlcheck/, @output))