diff options
Diffstat (limited to 'debian/mariadb-server-10.3.preinst')
-rw-r--r-- | debian/mariadb-server-10.3.preinst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/debian/mariadb-server-10.3.preinst b/debian/mariadb-server-10.3.preinst index 946e1c0dc11..1132184997e 100644 --- a/debian/mariadb-server-10.3.preinst +++ b/debian/mariadb-server-10.3.preinst @@ -22,10 +22,11 @@ mysql_upgradedir=/var/lib/mysql-upgrade # is running! Another mysqld in e.g. a different chroot is fine for us. stop_server() { if [ ! -x /etc/init.d/mysql ]; then return; fi - - # 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 --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 if [ -x /usr/sbin/invoke-rc.d ]; then |