diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-07 11:48:15 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-07 11:48:15 +0200 |
commit | 6f741eb6e4b88d17c48e43a48faf8e18ed5f33d8 (patch) | |
tree | 96ad1c019a99ed271f588471b710887aca42d297 /debian | |
parent | 0db27eff27dba9a2bf12653a20e503e029397b9a (diff) | |
parent | a5dc12eefd4bea1c3f77d02c55d0d459b4ae0566 (diff) | |
download | mariadb-git-6f741eb6e4b88d17c48e43a48faf8e18ed5f33d8.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'debian')
-rw-r--r-- | debian/mariadb-server-10.3.postrm | 5 | ||||
-rw-r--r-- | debian/mariadb-server-10.3.preinst | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/debian/mariadb-server-10.3.postrm b/debian/mariadb-server-10.3.postrm index 6ab40df2e12..62ddba7d02b 100644 --- a/debian/mariadb-server-10.3.postrm +++ b/debian/mariadb-server-10.3.postrm @@ -11,6 +11,11 @@ MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" # do it himself. No database directories should be removed while the server # is running! stop_server() { + # Return immediately if there are no mysql processes running + # as there is no point in trying to shutdown in that case. + # 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 invoke-rc.d mysql stop 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 |