summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuiXiaoDi <i@gxdvip.com>2022-06-03 15:08:46 +0800
committerDaniel Black <daniel@mariadb.org>2022-06-09 13:09:44 +1000
commit9c207c88c1411d1e538e8412182311de63757771 (patch)
tree36fec03979891081162ec31006d580d154e0ad3c
parent44ab6cba762e23a992e7c3bfd8f4319e56e08fe8 (diff)
downloadmariadb-git-9c207c88c1411d1e538e8412182311de63757771.tar.gz
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 467011bcac3b3f42ae6f21dde8d88e78708b21d1 / MDEV-26614 RedHat -> Red Hat by Daniel Black
-rw-r--r--support-files/mysql.server.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 7f034601539..54bd9463f61 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -9,7 +9,7 @@
# When this is done the mysql server will be started when the machine is
# 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
# description: A very fast and reliable SQL database engine.
@@ -52,7 +52,7 @@ datadir=
# Negative numbers mean to wait indefinitely
service_startup_timeout=900
-# Lock directory for RedHat / SuSE.
+# Lock directory for Red Hat / SuSE.
lockdir='/var/lock/subsys'
lock_file_path="$lockdir/mysql"
@@ -91,7 +91,7 @@ datadir_set=
#
# 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"
lsb_functions="/lib/lsb/init-functions"
if test -f $lsb_functions; then
@@ -100,6 +100,7 @@ fi
if test -f $init_functions; then
. $init_functions
+else
log_success_msg()
{
echo " SUCCESS! $@"
@@ -309,7 +310,7 @@ case "$mode" in
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" &
wait_for_ready; return_value=$?
- # Make lock for RedHat / SuSE
+ # Make lock for Red Hat / SuSE
if test -w "$lockdir"
then
touch "$lock_file_path"
@@ -339,7 +340,7 @@ case "$mode" in
rm "$mysqld_pid_file_path"
fi
- # Delete lock for RedHat / SuSE
+ # Delete lock for Red Hat / SuSE
if test -f "$lock_file_path"
then
rm -f "$lock_file_path"