From 467011bcac3b3f42ae6f21dde8d88e78708b21d1 Mon Sep 17 00:00:00 2001 From: Alexey Bychko Date: Wed, 22 Sep 2021 18:08:50 +0700 Subject: MDEV-26612 Two different ways to start MariaDB service can cause data corruption 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 --- support-files/mysql.server.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'support-files') 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! $@" -- cgit v1.2.1