mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
BUG#27367 mysql.server should be LSB init script compliant
This commit is contained in:
parent
bd0b76e20d
commit
837b5c983a
1 changed files with 11 additions and 2 deletions
|
@ -371,7 +371,7 @@ case "$mode" in
|
|||
;;
|
||||
'status')
|
||||
# First, check to see if pid file exists
|
||||
if [ -s "$server_pid_file" ] ; then
|
||||
if test -s "$server_pid_file" ; then
|
||||
read mysqld_pid < $server_pid_file
|
||||
if kill -0 $mysqld_pid 2>/dev/null ; then
|
||||
log_success_msg "MySQL running ($mysqld_pid)"
|
||||
|
@ -383,7 +383,16 @@ case "$mode" in
|
|||
else
|
||||
# Try to find appropriate mysqld process
|
||||
mysqld_pid=`pidof $sbindir/mysqld`
|
||||
if [ -z $mysqld_pid ] ; then
|
||||
if test -z $mysqld_pid ; then
|
||||
if test "$use_mysqld_safe" = "0" ; then
|
||||
lockfile=/var/lock/subsys/mysqlmanager
|
||||
else
|
||||
lockfile=/var/lock/subsys/mysql
|
||||
fi
|
||||
if test -f $lockfile ; then
|
||||
log_failure_msg "MySQL is not running, but lock exists"
|
||||
exit 2
|
||||
fi
|
||||
log_failure_msg "MySQL is not running"
|
||||
exit 3
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue