summaryrefslogtreecommitdiff
path: root/debian/mariadb-server-10.4.preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/mariadb-server-10.4.preinst')
-rw-r--r--debian/mariadb-server-10.4.preinst6
1 files changed, 4 insertions, 2 deletions
diff --git a/debian/mariadb-server-10.4.preinst b/debian/mariadb-server-10.4.preinst
index 6e3b8e761e1..b3977a40bac 100644
--- a/debian/mariadb-server-10.4.preinst
+++ b/debian/mariadb-server-10.4.preinst
@@ -20,9 +20,11 @@ mysql_upgradedir=/var/lib/mysql-upgrade
# 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.
stop_server() {
- # Return immediately if there are no mysql processes running
+ # Return immediately if there are no mysql processes running on a host
+ # (leave containerized processes with the same name in other namespaces)
# as there is no point in trying to shutdown in that case.
- if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi
+ # Compatibility with versions that ran 'mariadbd'
+ if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
set +e
systemctl stop mysql