summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Bychko <alexey.bychko@mariadb.com>2021-09-22 18:08:50 +0700
committerAlexey Bychko <alexey.bychko@mariadb.com>2021-09-22 18:09:34 +0700
commit23bfbba97959dbeba2e7f1d7046d04dbf911cbc4 (patch)
tree025f167140926d9fd4b65af99be2b190b7a73f8d
parentac1c6738f973498e2d136d5e419b961c151aa318 (diff)
downloadmariadb-git-abychko-10.2-MDEV-26612.tar.gz
MDEV-26612 Two different ways to start MariaDB service can cause data corruptionabychko-10.2-MDEV-26612
RedHat systems have both files for lsb and init functions. Old code was written as if/else, so second file (RedHat-specific) was not processed. So, systemd redirect didn't work, because its logic is described in RedHat-specific functions file
-rw-r--r--support-files/mysql.server.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 6eb2d0bc257..7f034601539 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -91,16 +91,15 @@ datadir_set=
#
# Use LSB init script functions for printing messages, if possible
-#
+# Include non-LSB RedHat 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
+if test -f $lsb_functions; then
. $lsb_functions
-else
- # Include non-LSB RedHat init functions to make systemctl redirect work
- init_functions="/etc/init.d/functions"
- if test -f $init_functions; then
- . $init_functions
- fi
+fi
+
+if test -f $init_functions; then
+ . $init_functions
log_success_msg()
{
echo " SUCCESS! $@"