Skip to content

Commit 467011b

Browse files
committed
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
1 parent 47ba552 commit 467011b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

support-files/mysql.server.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,15 @@ datadir_set=
9191

9292
#
9393
# Use LSB init script functions for printing messages, if possible
94-
#
94+
# Include non-LSB RedHat init functions to make systemctl redirect work
95+
init_functions="/etc/init.d/functions"
9596
lsb_functions="/lib/lsb/init-functions"
96-
if test -f $lsb_functions ; then
97+
if test -f $lsb_functions; then
9798
. $lsb_functions
98-
else
99-
# Include non-LSB RedHat init functions to make systemctl redirect work
100-
init_functions="/etc/init.d/functions"
101-
if test -f $init_functions; then
102-
. $init_functions
103-
fi
99+
fi
100+
101+
if test -f $init_functions; then
102+
. $init_functions
104103
log_success_msg()
105104
{
106105
echo " SUCCESS! $@"

0 commit comments

Comments
 (0)