/[gentoo-x86]/eclass/mysql.eclass
Gentoo

Diff of /eclass/mysql.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.84 Revision 1.85
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/mysql.eclass,v 1.84 2008/01/16 04:01:14 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/mysql.eclass,v 1.85 2008/03/09 21:09:23 robbat2 Exp $
4 4
5# Author: Francesco Riosa (Retired) <vivo@gentoo.org> 5# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
6# Maintainer: Luca Longinotti <chtekk@gentoo.org> 6# Maintainer: Luca Longinotti <chtekk@gentoo.org>
7 7
8# Both MYSQL_VERSION_ID and MYSQL_PATCHSET_REV must be set in the ebuild too! 8# Both MYSQL_VERSION_ID and MYSQL_PATCHSET_REV must be set in the ebuild too!
819 && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ 819 && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
820 || touch "${TMPDIR}/fill_help_tables.sql" 820 || touch "${TMPDIR}/fill_help_tables.sql"
821 help_tables="${TMPDIR}/fill_help_tables.sql" 821 help_tables="${TMPDIR}/fill_help_tables.sql"
822 822
823 pushd "${TMPDIR}" &>/dev/null 823 pushd "${TMPDIR}" &>/dev/null
824 "${ROOT}/usr/bin/mysql_install_db" | grep -B5 -A999 -i "ERROR" 824 "${ROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1
825 if [ $? -ne 0 ]; then
826 grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
827 die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
828 fi
825 popd &>/dev/null 829 popd &>/dev/null
826 [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ 830 [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
827 || die "MySQL databases not installed" 831 || die "MySQL databases not installed"
828 chown -R mysql:mysql "${ROOT}/${MY_DATADIR}" 2> /dev/null 832 chown -R mysql:mysql "${ROOT}/${MY_DATADIR}" 2> /dev/null
829 chmod 0750 "${ROOT}/${MY_DATADIR}" 2> /dev/null 833 chmod 0750 "${ROOT}/${MY_DATADIR}" 2> /dev/null

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

  ViewVC Help
Powered by ViewVC 1.1.20