summaryrefslogtreecommitdiff
path: root/debian/mariadb-server-10.6.preinst
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-07-03 21:49:45 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2020-07-04 11:53:26 +0200
commit272828a171417c2cc7b27b7e3aad18c85bb7d0be (patch)
tree993dea827655fce69cc74eb5abff5d9e8b1aaaaf /debian/mariadb-server-10.6.preinst
parentd15c839c0dab4016eb425fdb109a5dd8ecd918a4 (diff)
parent7a4afad969e5cb903cdf82386398a75710f5ed80 (diff)
downloadmariadb-git-272828a171417c2cc7b27b7e3aad18c85bb7d0be.tar.gz
Merge branch '10.5' into 10.6
Diffstat (limited to 'debian/mariadb-server-10.6.preinst')
-rw-r--r--debian/mariadb-server-10.6.preinst12
1 files changed, 6 insertions, 6 deletions
diff --git a/debian/mariadb-server-10.6.preinst b/debian/mariadb-server-10.6.preinst
index 947b4420ee6..ce4ca3fee9d 100644
--- a/debian/mariadb-server-10.6.preinst
+++ b/debian/mariadb-server-10.6.preinst
@@ -26,21 +26,21 @@ mysql_upgradedir=/var/lib/mysql-upgrade
# Try to stop the server in a sane way. If it does not success let the admin
# do it himself. No database directories should be removed while the server
-# is running! Another mysqld in e.g. a different chroot is fine for us.
+# is running! Another mariadbd in e.g. a different chroot is fine for us.
stop_server() {
# Return immediately if there are no mysql processes running
# as there is no point in trying to shutdown in that case.
- if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi
+ if ! pgrep -x --ns $$ mariadbd > /dev/null; then return; fi
set +e
- systemctl stop mysql
+ invoke-rc.d mariadb stop
errno=$?
set -e
- # 0=ok, 100=no init script (fresh install)
+ # systemctl could emit exit code 100=no init script (fresh install)
if [ "$errno" != 0 -a "$errno" != 100 ]; then
- echo "'systemctl stop mysql' returned $errno" 1>&2
- echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
+ echo "Attempt to stop MariaDB/MySQL server returned exitcode $errno" 1>&2
+ echo "There is a MariaDB/MySQL server running, but we failed in our attempts to stop it." 1>&2
echo "Stop it yourself and try again!" 1>&2
db_stop
exit 1