Skip to content

Commit 7c1807a

Browse files
ottokgrooverdan
authored andcommitted
Deb: On upgrades, stop both mysqld and mariadbd for backwards compat
1 parent b8031e3 commit 7c1807a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

debian/mariadb-server-10.5.postrm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ stop_server() {
1818
# Return immediately if there are no mysql processes running
1919
# as there is no point in trying to shutdown in that case.
2020
if ! pgrep -x mariadbd > /dev/null; then return; fi
21+
# Compatibility with versions that ran 'mysqld'
22+
if ! pgrep -x mysqld > /dev/null; then return; fi
2123

2224
set +e
2325
invoke-rc.d mariadb stop
26+
invoke-rc.d mysql stop # Backwards compatibility
2427
errno=$?
2528
set -e
2629

debian/mariadb-server-10.5.preinst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ stop_server() {
3131
# Return immediately if there are no mysql processes running
3232
# as there is no point in trying to shutdown in that case.
3333
if ! pgrep -x --ns $$ mariadbd > /dev/null; then return; fi
34+
# Compatibility with versions that ran 'mysqld'
35+
if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi
3436

3537
set +e
3638
invoke-rc.d mariadb stop
39+
invoke-rc.d mysql stop # Backwards compatibility
3740
errno=$?
3841
set -e
3942

0 commit comments

Comments
 (0)