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

Diff of /eclass/mysql.eclass

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

Revision 1.16 Revision 1.17
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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/mysql.eclass,v 1.16 2006/02/08 21:25:53 vivo Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.17 2006/02/09 13:15:43 vivo Exp $
4 4
5# Author: Francesco Riosa <vivo at gentoo.org> 5# Author: Francesco Riosa <vivo at gentoo.org>
6# Maintainer: Francesco Riosa <vivo at gentoo.org> 6# Maintainer: Francesco Riosa <vivo at gentoo.org>
7 7
8inherit eutils flag-o-matic gnuconfig mysql_fx 8inherit eutils flag-o-matic gnuconfig mysql_fx
53 MY_LOGDIR=${MY_LOGDIR="/var/log/mysql${MY_SUFFIX}"} 53 MY_LOGDIR=${MY_LOGDIR="/var/log/mysql${MY_SUFFIX}"}
54 MY_INCLUDEDIR=${MY_INCLUDEDIR="/usr/include/mysql${MY_SUFFIX}"} 54 MY_INCLUDEDIR=${MY_INCLUDEDIR="/usr/include/mysql${MY_SUFFIX}"}
55 55
56 if [ -z "${DATADIR}" ]; then 56 if [ -z "${DATADIR}" ]; then
57 DATADIR="" 57 DATADIR=""
58 if [ -f "${SYSCONFDIR}/my.cnf" ] ; then 58 if [ -f "${MY_SYSCONFDIR}/my.cnf" ] ; then
59 DATADIR=`"my_print_defaults${MY_SUFFIX}" mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` 59 DATADIR=`"my_print_defaults${MY_SUFFIX}" mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
60 if [ -z "${DATADIR}" ]; then 60 if [ -z "${DATADIR}" ]; then
61 if useq "srvdir" ; then 61 if useq "srvdir" ; then
62 DATADIR="/srv/localhost/mysql/datadir" 62 DATADIR="${ROOT}/srv/localhost/mysql${MY_SUFFIX}/datadir"
63 else 63 else
64 DATADIR=`grep ^datadir "${SYSCONFDIR}/my.cnf" | sed -e 's/.*=\s*//'` 64 DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" | sed -e 's/.*=\s*//'`
65 fi 65 fi
66 fi 66 fi
67 fi 67 fi
68 if [ -z "${DATADIR}" ]; then 68 if [ -z "${DATADIR}" ]; then
69 if useq "srvdir" ; then
70 DATADIR="${ROOT}/srv/localhost/mysql${MY_SUFFIX}/datadir"
71 else
69 DATADIR="${MY_LOCALSTATEDIR}" 72 DATADIR="${MY_LOCALSTATEDIR}"
73 fi
70 einfo "Using default DATADIR" 74 einfo "Using default DATADIR"
71 fi 75 fi
72 einfo "MySQL DATADIR is ${DATADIR}" 76 einfo "MySQL DATADIR is ${DATADIR}"
73 77
74 if [ -z "${PREVIOUS_DATADIR}" ] ; then 78 if [ -z "${PREVIOUS_DATADIR}" ] ; then

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20