mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
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.
This commit is contained in:
parent
50cdf0b5ea
commit
2740b657ce
1 changed files with 4 additions and 4 deletions
8
debian/mariadb-server-10.6.postinst
vendored
8
debian/mariadb-server-10.6.postinst
vendored
|
@ -125,10 +125,10 @@ EOF
|
||||||
# This direct update is needed to enable an authentication mechanism to
|
# This direct update is needed to enable an authentication mechanism to
|
||||||
# perform mariadb-upgrade, (MDEV-22678). To keep the impact minimal, we
|
# 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.
|
# skip innodb and set key-buffer-size to 0 as it isn't reused.
|
||||||
lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null
|
if [ -f "$mysql_datadir/auto.cnf" ] &&
|
||||||
lsof_rtn_code=$?
|
[ -f "$mysql_datadir/mysql/user.MYD" ] &&
|
||||||
if [ -f "$mysql_datadir/auto.cnf" ] && [ -f "$mysql_datadir/mysql/user.MYD" ] &&
|
! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null &&
|
||||||
[ ! ${lsof_rtn_code} ] && [ ! -f "$mysql_datadir/undo_001" ]
|
[ ! -f "$mysql_datadir/undo_001" ]
|
||||||
then
|
then
|
||||||
echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" |
|
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
|
mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null
|
||||||
|
|
Loading…
Reference in a new issue