2003-02-19 21:02:05 +01:00
|
|
|
#!/bin/sh
|
2010-12-28 19:57:23 +01:00
|
|
|
|
|
|
|
# Copyright (C) 2003, 2005 MySQL AB
|
2014-02-17 18:19:04 +05:30
|
|
|
# Use is subject to license terms
|
2010-12-28 19:57:23 +01:00
|
|
|
#
|
|
|
|
# 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
|
2013-03-19 15:53:48 +01:00
|
|
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
2019-05-11 21:29:06 +03:00
|
|
|
# MA 02110-1335 USA
|
2010-12-28 19:57:23 +01:00
|
|
|
|
2003-02-19 21:02:05 +01:00
|
|
|
#
|
2005-08-11 21:18:45 +02:00
|
|
|
# postflight - this script will be executed after the MySQL PKG
|
2003-02-19 21:02:05 +01:00
|
|
|
# installation has been performed.
|
|
|
|
#
|
|
|
|
# This script will install the MySQL privilege tables using the
|
|
|
|
# "mysql_install_db" script and will correct the ownerships of these files
|
|
|
|
# afterwards.
|
|
|
|
#
|
|
|
|
|
2003-02-25 15:20:07 +01:00
|
|
|
if cd @prefix@ ; then
|
|
|
|
if [ ! -f data/mysql/db.frm ] ; then
|
2003-12-08 14:38:29 +01:00
|
|
|
./scripts/mysql_install_db --rpm
|
2003-02-25 15:20:07 +01:00
|
|
|
fi
|
2003-02-19 21:02:05 +01:00
|
|
|
|
2003-02-25 15:20:07 +01:00
|
|
|
if [ -d data ] ; then
|
|
|
|
chown -R @MYSQLD_USER@ data
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
exit $?
|
2003-02-19 21:02:05 +01:00
|
|
|
fi
|