summaryrefslogtreecommitdiff
path: root/support-files/rpm
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-05-06 12:12:10 +0200
committerSergei Golubchik <serg@mariadb.org>2019-05-06 15:57:52 +0200
commit147c1239f1eb97c79dc498f16a2483e62aecb32d (patch)
tree8455ae298f05dc02f532299822c181522e34661c /support-files/rpm
parentc83f83705309e34e5d5f35b34be79f2143af2e61 (diff)
downloadmariadb-git-147c1239f1eb97c79dc498f16a2483e62aecb32d.tar.gz
MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
regression after 3db6de33b2b in RPMs continue creating the $datadir outside of mysql_install_db. RPMs put the socket in there, so it cannot be chmod 0700.
Diffstat (limited to 'support-files/rpm')
-rw-r--r--support-files/rpm/server-postin.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index 57db9fd5d90..0a5bac73f0b 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -53,6 +53,9 @@ if [ $1 = 1 ] ; then
chown -R %{mysqld_user}:%{mysqld_group} $datadir
if [ ! -e $datadir/mysql ]; then
+ # Create data directory
+ mkdir -p $datadir
+
# Initiate databases
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
fi