summaryrefslogtreecommitdiff
path: root/support-files/MacOSX/postflight.sh
diff options
context:
space:
mode:
Diffstat (limited to 'support-files/MacOSX/postflight.sh')
-rw-r--r--support-files/MacOSX/postflight.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/support-files/MacOSX/postflight.sh b/support-files/MacOSX/postflight.sh
new file mode 100644
index 00000000000..451eb65e0d7
--- /dev/null
+++ b/support-files/MacOSX/postflight.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# postflight - this script will be executed after the MySQL PKG
+# 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.
+#
+
+if cd @prefix@ ; then
+ if [ ! -f data/mysql/db.frm ] ; then
+ ./scripts/mysql_install_db --rpm
+ fi
+
+ if [ -d data ] ; then
+ chown -R @MYSQLD_USER@ data
+ fi
+else
+ exit $?
+fi