diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/sbin/e-smith/mysql57-preload smeserver-mysql57-2.0.0/root/sbin/e-smith/mysql57-preload --- smeserver-mysql57-2.0.0.old/root/sbin/e-smith/mysql57-preload 2022-03-12 21:52:46.616000000 -0500 +++ smeserver-mysql57-2.0.0/root/sbin/e-smith/mysql57-preload 2022-03-12 21:57:34.737000000 -0500 @@ -19,12 +19,12 @@ my $runlevel; -open (RUNLEVEL, "-|", "/sbin/runlevel"); +open (RUNLEVEL, "-|", "/usr/bin/systemctl get-default"); (undef, $runlevel) = split(' ',); close RUNLEVEL; -if ($runlevel ne '7' || $event eq 'bootstrap-console-save') +if ( ($runlevel ne 'multi-user.target' && $runlevel ne "sme-server.target") || $event eq 'bootstrap-console-save') { my $pid = open(KID, "|-"); if (defined $pid) @@ -46,7 +46,7 @@ } # Hard-code user, since it is set in mysqld_safe currently. # See http://bugs.mysql.com/2163 - exec($mysqld, qw(--bootstrap --user=mysql --skip-grant-tables)); + exec("/usr/bin/scl enable rh-mysql57 -- $mysqld", qw(--bootstrap --user=mysql --skip-grant-tables)); } } else diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/sbin/e-smith/systemd/mysql57-mysql.init smeserver-mysql57-2.0.0/root/sbin/e-smith/systemd/mysql57-mysql.init --- smeserver-mysql57-2.0.0.old/root/sbin/e-smith/systemd/mysql57-mysql.init 2022-03-12 21:52:46.682000000 -0500 +++ smeserver-mysql57-2.0.0/root/sbin/e-smith/systemd/mysql57-mysql.init 2022-03-12 21:54:57.429000000 -0500 @@ -1,7 +1,7 @@ #!/bin/sh #---------------------------------------------------------------------- -# copyright (C) 2002 Mitel Networks Corporation +# copyright (C) 2022 Koozali Foundation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ for i in $(seq 1 10) do - if test -e /var/lib/mysql/mysql.sock + if test -e /var/lib/mysql/mysql57.sock then exit_value=0 HOME=/root @@ -45,10 +45,10 @@ F=$(basename $link | sed s/S[0-9][0-9]//) case $F in *.sql) - action "Loading $F into mysql" /usr/bin/mysql < $link && /bin/rm $link + action "Loading $F into mysql 57 " /usr/bin/mysql --socket=/var/lib/mysql/mysql57.sock < $link && /bin/rm $link ;; *) - action "Loading $F into mysql" $link && /bin/rm $link + action "Loading $F into mysql 57 " $link && /bin/rm $link ;; esac # Record any failure for the final return value. @@ -58,7 +58,7 @@ done exit $exit_value fi - echo "Waiting for mysql to startup" >&2 + echo "Waiting for mysql 57 to startup" >&2 sleep 2 done