diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-03-24 03:45:56 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-03-24 03:45:56 +0000 |
commit | 9431932a108f6656e0db2aac439d2c7b2053deb3 (patch) | |
tree | 28ca601924b708c52f1bdfac7c9cd2da64119851 /eclass | |
parent | Minor patchset bump for failed testcases that were noted in sec stabilization... (diff) | |
download | historical-9431932a108f6656e0db2aac439d2c7b2053deb3.tar.gz historical-9431932a108f6656e0db2aac439d2c7b2053deb3.tar.bz2 historical-9431932a108f6656e0db2aac439d2c7b2053deb3.zip |
Bug #278633: add in support for mysql root password from secure config file.
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}/*)" |