extra/mariadb to 10.0.17-2

This commit is contained in:
Kevin Mihelich 2015-03-07 14:54:57 +00:00
parent b43b32b552
commit ef38ad296e
2 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@ pkgbase=mariadb
pkgname=('libmariadbclient' 'mariadb-clients' 'mytop' 'mariadb')
pkgver=10.0.17
_pkgver=${pkgver/.a/a}
pkgrel=1
pkgrel=2
arch=('i686' 'x86_64')
license=('GPL')
url='http://mariadb.org/'

View file

@ -2,7 +2,7 @@ post_install(){
groupadd -g 89 mysql &>/dev/null
useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
if [[ ! -e $datadir ]]; then
if [[ ! -e var/lib/mysql ]]; then
install -dm700 var/lib/mysql
chown -R mysql:mysql var/lib/mysql &>/dev/null
fi
@ -16,11 +16,12 @@ post_install(){
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 $datadir -s /bin/false 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.25-4)" -lt 0 ]] && [[ -d /data ]]; then
for x in data/*; do
cp -r $x $datadir/
cp -r $x var/lib/mysql
done
rm -rf data
fi