[arch-commits] Commit in mariadb/trunk (mariadb.install)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Fri Feb 27 06:37:02 UTC 2015
Date: Friday, February 27, 2015 @ 07:37:02
Author: bpiotrowski
Revision: 232041
Don't initialize the data directory in post_install (FS#43036)
Modified:
mariadb/trunk/mariadb.install
-----------------+
mariadb.install | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Modified: mariadb.install
===================================================================
--- mariadb.install 2015-02-27 04:56:21 UTC (rev 232040)
+++ mariadb.install 2015-02-27 06:37:02 UTC (rev 232041)
@@ -1,18 +1,16 @@
-if [[ $(command -v my_print_defaults >/dev/null 2>&1) ]]; then
- datadir=$(my_print_defaults mysqld | sed -n "s/^--datadir=//p")
-fi
-[[ -z $datadir ]] && datadir=/var/lib/mysql
-
post_install(){
groupadd -g 89 mysql &>/dev/null
- useradd -u 89 -g mysql -d $datadir -s /bin/false mysql &>/dev/null
+ useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
if [[ ! -e $datadir ]]; then
- install -dm700 $datadir
- usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=$datadir
+ install -dm700 var/lib/mysql
chown -R mysql:mysql var/lib/mysql &>/dev/null
fi
+ echo ":: You need to initialize the MariaDB data directory prior to starting"
+ echo " the service. This can be done with mysql_install_db command, e.g.:"
+ echo " mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
+
usr/bin/systemd-tmpfiles --create mysql.conf
}
More information about the arch-commits
mailing list