From 6b040b23f744f93445a35aef03bf1bbf67402c47 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 30 Oct 2014 08:49:19 -0400 Subject: [PATCH] fix defect 4343 --- xCAT-client/bin/mysqlsetup | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup index 2e9f48fe2..0947a4688 100755 --- a/xCAT-client/bin/mysqlsetup +++ b/xCAT-client/bin/mysqlsetup @@ -883,8 +883,11 @@ sub mysqlstart else { if ($::MariaDB==1) { # running MariaDB - #$cmd = "service mariadb start"; - $ret=xCAT::Utils->startservice("mariadb"); + if ($::linuxos =~ /rh.*/) { + $ret=xCAT::Utils->startservice("mariadb"); + } else { # sles + $ret=xCAT::Utils->startservice("mysql"); + } } else { # it is mysql @@ -993,7 +996,11 @@ sub mysqlreboot { if ($::MariaDB==1 ) { # MariaDB not MySQL + if ($::linuxos =~ /rh.*/) { $cmd = "chkconfig mariadb on"; + } else { #sles + $cmd = "chkconfig mysql on"; + } } else { # mysql if ($::linuxos =~ /rh.*/) {