diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/mysql.eclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/mysql.eclass b/eclass/mysql.eclass index 71613663bd47..9ab804c28721 100644 --- a/eclass/mysql.eclass +++ b/eclass/mysql.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.140 2010/03/24 03:09:08 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.141 2010/03/24 03:45:56 robbat2 Exp $ # @ECLASS: mysql.eclass # @MAINTAINER: @@ -1109,6 +1109,10 @@ mysql_pkg_config() { local MYSQL_ROOT_PASSWORD='' local maxtry=15 + if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${ROOT}/root/.my.cnf" ]; then + MYSQL_ROOT_PASSWORD="$(sed -n -e '/^password=/s,^password=,,gp' "${ROOT}/root/.my.cnf")" + fi + if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "(${ROOT}/${MY_DATADIR}/*)" |