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
This commit is contained in:
Alexey Bychko 2021-09-22 18:08:50 +07:00
commit 467011bcac

View file

@ -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! $@"