mariadb/support-files/MacOSX/postflight.sh
Daniel Black 773d2d1960 MDEV-36738: mariadb@.service incorrectly changing pam ownership in mariadb-install-db
It was mysql_install_db, and this is changed to mariadb-install-db.
likewise changed all of the support-files references to
mysql_install_db.

This install script is part of the service as a useful instigation
step, and a no-op in subseqeuent runs.

This script does however change the auth_pam_tool_dir ownership.
When running a multi-instance based on username, changing the
auth_pam_tool_dir will only cause troubles for the other users.

If you are running multiple instances on username is seems you
are unlikely do be having pam access for all users. Even
if you where the solution on auth_pam_tool_dir would be a group
permission and group access based on the users.

As such skip the changing of ownership.
2025-06-25 20:54:22 +10:00

40 lines
1.2 KiB
Bash

#!/bin/sh
# Copyright (C) 2003, 2005 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1335 USA
#
# postflight - this script will be executed after the MySQL PKG
# installation has been performed.
#
# This script will install the MySQL privilege tables using the
# "mariadb-install-db" script and will correct the ownerships of these files
# afterwards.
#
if cd @prefix@ ; then
if [ ! -f data/mysql/db.frm ] ; then
./scripts/mariadb-install-db --rpm
fi
if [ -d data ] ; then
chown -R @MYSQLD_USER@ data
fi
else
exit $?
fi