Commit 9c207c88 authored by GuiXiaoDi's avatar GuiXiaoDi Committed by Daniel Black

mysql.server.sh fix for non-Red Hat platforms

The else condition is meant to be here to define the functions
if the Red Hat include file isn't there.

Fixes: commit 467011bc / MDEV-26614

RedHat -> Red Hat by Daniel Black
parent 44ab6cba
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# When this is done the mysql server will be started when the machine is # When this is done the mysql server will be started when the machine is
# started and shut down when the systems goes down. # started and shut down when the systems goes down.
# Comments to support chkconfig on RedHat Linux # Comments to support chkconfig on Red Hat Linux
# chkconfig: 2345 64 36 # chkconfig: 2345 64 36
# description: A very fast and reliable SQL database engine. # description: A very fast and reliable SQL database engine.
...@@ -52,7 +52,7 @@ datadir= ...@@ -52,7 +52,7 @@ datadir=
# Negative numbers mean to wait indefinitely # Negative numbers mean to wait indefinitely
service_startup_timeout=900 service_startup_timeout=900
# Lock directory for RedHat / SuSE. # Lock directory for Red Hat / SuSE.
lockdir='/var/lock/subsys' lockdir='/var/lock/subsys'
lock_file_path="$lockdir/mysql" lock_file_path="$lockdir/mysql"
...@@ -91,7 +91,7 @@ datadir_set= ...@@ -91,7 +91,7 @@ datadir_set=
# #
# Use LSB init script functions for printing messages, if possible # Use LSB init script functions for printing messages, if possible
# Include non-LSB RedHat init functions to make systemctl redirect work # Include non-LSB Red Hat init functions to make systemctl redirect work
init_functions="/etc/init.d/functions" init_functions="/etc/init.d/functions"
lsb_functions="/lib/lsb/init-functions" lsb_functions="/lib/lsb/init-functions"
if test -f $lsb_functions; then if test -f $lsb_functions; then
...@@ -100,6 +100,7 @@ fi ...@@ -100,6 +100,7 @@ fi
if test -f $init_functions; then if test -f $init_functions; then
. $init_functions . $init_functions
else
log_success_msg() log_success_msg()
{ {
echo " SUCCESS! $@" echo " SUCCESS! $@"
...@@ -309,7 +310,7 @@ case "$mode" in ...@@ -309,7 +310,7 @@ case "$mode" in
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" & $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" &
wait_for_ready; return_value=$? wait_for_ready; return_value=$?
# Make lock for RedHat / SuSE # Make lock for Red Hat / SuSE
if test -w "$lockdir" if test -w "$lockdir"
then then
touch "$lock_file_path" touch "$lock_file_path"
...@@ -339,7 +340,7 @@ case "$mode" in ...@@ -339,7 +340,7 @@ case "$mode" in
rm "$mysqld_pid_file_path" rm "$mysqld_pid_file_path"
fi fi
# Delete lock for RedHat / SuSE # Delete lock for Red Hat / SuSE
if test -f "$lock_file_path" if test -f "$lock_file_path"
then then
rm -f "$lock_file_path" rm -f "$lock_file_path"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment