summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-09-07 02:00:44 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-09-07 02:00:44 +0000
commit1831c25086eb8ea13fdb20531fd95ede083e4514 (patch)
tree00370bacc11b4de869fbc634df4db4f287719d5a /dev-db/mysql/files
parenttemp. mask doc (diff)
downloadhistorical-1831c25086eb8ea13fdb20531fd95ede083e4514.tar.gz
historical-1831c25086eb8ea13fdb20531fd95ede083e4514.tar.bz2
historical-1831c25086eb8ea13fdb20531fd95ede083e4514.zip
Fix #62603, #62903.
Diffstat (limited to 'dev-db/mysql/files')
-rw-r--r--dev-db/mysql/files/mysql-4.0.15.rc617
1 files changed, 12 insertions, 5 deletions
diff --git a/dev-db/mysql/files/mysql-4.0.15.rc6 b/dev-db/mysql/files/mysql-4.0.15.rc6
index 62ed0bb45c66..35ea07645523 100644
--- a/dev-db/mysql/files/mysql-4.0.15.rc6
+++ b/dev-db/mysql/files/mysql-4.0.15.rc6
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql-4.0.15.rc6,v 1.3 2004/07/14 21:41:15 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql-4.0.15.rc6,v 1.4 2004/09/07 02:00:44 robbat2 Exp $
depend() {
need net
@@ -9,14 +9,21 @@ depend() {
}
checkconfig() {
- if [ ! -f /etc/mysql/my.cnf ] ; then
+ if [ ! -f /etc/mysql/my.cnf ]; then
eerror "No /etc/mysql/my.cnf file exists!"
fi
- dir=`my_print_defaults mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|"`
+ #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'`
+ dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
- if [ ! -d $dir/mysql ] ; then
- eerror "You dont appear to have the mysql database installed yet."
+ if [ -z "$dir" ]; then
+ eerror "Your mysql doesn't have any datadir setting, default or specific"
+ eerror "Please check your my.cnf"
+ return 1
+ fi
+
+ if [ ! -d "$dir/mysql" ]; then
+ eerror "You don't appear to have the mysql database installed yet."
eerror "Please run /usr/bin/mysql_install_db to have this done..."
return 1
fi