diff options
author | root <root@rshg054.dnsready.net> | 2012-12-17 03:27:42 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-12-17 03:27:42 -0800 |
commit | bfa298276aad0011c7ac64738d521600e76c3628 (patch) | |
tree | 4256caa850d2294cc064358de7380814a8772d14 /community/mariadb | |
parent | d1335cc6b44826a3ae6934a40bd618bfddcd2e6e (diff) |
Mon Dec 17 03:23:21 PST 2012
Diffstat (limited to 'community/mariadb')
-rw-r--r-- | community/mariadb/PKGBUILD | 4 | ||||
-rw-r--r-- | community/mariadb/mariadb.install | 27 |
2 files changed, 19 insertions, 12 deletions
diff --git a/community/mariadb/PKGBUILD b/community/mariadb/PKGBUILD index 91b606f4c..ffc414ab2 100644 --- a/community/mariadb/PKGBUILD +++ b/community/mariadb/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 80718 2012-11-30 22:24:36Z bpiotrowski $ +# $Id: PKGBUILD 81289 2012-12-16 09:10:36Z bpiotrowski $ # Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> pkgbase=mariadb pkgname=('libmariadbclient' 'mariadb-clients' 'mariadb') pkgver=5.5.28.a _pkgver=${pkgver/.a/a} -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') license=('GPL') url="http://mariadb.org/" diff --git a/community/mariadb/mariadb.install b/community/mariadb/mariadb.install index 921147428..4ac50ec94 100644 --- a/community/mariadb/mariadb.install +++ b/community/mariadb/mariadb.install @@ -1,28 +1,35 @@ post_install(){ groupadd -g 89 mysql &>/dev/null useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null - /usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql + usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql chown -R mysql:mysql var/lib/mysql &>/dev/null + + if [[ ! -d run/mysqld ]]; then + usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/mysql.conf + fi } post_upgrade(){ getent group mysql >/dev/null 2>&1 || groupadd -g 89 mysql &>/dev/null getent passwd mysql >/dev/null 2>&1 || useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null - if [ "$(vercmp $2 5.5)" -lt 0 ]; then - echo " >> " - echo " >> Major version update. Consider restart the service, and then running mysql_upgrade after it." - echo " >> " + if [[ ! -d run/mysqld ]]; then + usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/mysql.conf + fi + + if [[ "$(vercmp $2 5.5)" -lt 0 ]]; then + echo ">>> Major version update. Consider restart the service, and" + echo " then running mysql_upgrade after it." fi - if [ "$(vercmp $2 5.5.25-4)" -lt 0 ] && [ -d /data ]; then - for x in /data/*; do - cp -r $x /var/lib/mysql/ + if [[ "$(vercmp $2 5.5.25-4)" -lt 0 ]] && [[ -d /data ]]; then + for x in data/*; do + cp -r $x var/lib/mysql/ done - rm -rf /data + rm -rf data fi - if [ "$(vercmp $2 5.5.25-5)" -lt 0 ]; then + if [[ "$(vercmp $2 5.5.25-5)" -lt 0 ]]; then echo ">>> mysql.service has been renamed to mysqld.service to keep" echo " consistency with MySQL package." fi |