diff options
author | Tuukka Pasanen <tuukka.pasanen@ilmi.fi> | 2023-05-08 11:35:32 +0300 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2023-05-09 08:55:05 +1000 |
commit | 2740b657ced466c9f6945d59b78915ca6000e890 (patch) | |
tree | 004f38e1851ad629550f47a3011ccf2a2cea80bd | |
parent | 50cdf0b5ea8aa4b2b3f20ed8285debbff655cab9 (diff) | |
download | mariadb-git-2740b657ced466c9f6945d59b78915ca6000e890.tar.gz |
MDEV-31216: Make sure that lsof does not fail on install
Command lsof can fail on Debian install.
Revert logic more like old one to make sure that there is no failing
and still does don't boundce on shellcheck.
-rw-r--r-- | debian/mariadb-server-10.6.postinst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/debian/mariadb-server-10.6.postinst b/debian/mariadb-server-10.6.postinst index eb0423c3bc7..b87ce856313 100644 --- a/debian/mariadb-server-10.6.postinst +++ b/debian/mariadb-server-10.6.postinst @@ -125,10 +125,10 @@ EOF # This direct update is needed to enable an authentication mechanism to # perform mariadb-upgrade, (MDEV-22678). To keep the impact minimal, we # skip innodb and set key-buffer-size to 0 as it isn't reused. - lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null - lsof_rtn_code=$? - if [ -f "$mysql_datadir/auto.cnf" ] && [ -f "$mysql_datadir/mysql/user.MYD" ] && - [ ! ${lsof_rtn_code} ] && [ ! -f "$mysql_datadir/undo_001" ] + if [ -f "$mysql_datadir/auto.cnf" ] && + [ -f "$mysql_datadir/mysql/user.MYD" ] && + ! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null && + [ ! -f "$mysql_datadir/undo_001" ] then echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" | mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null |