]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- db initialization works now. should be fine now. please, test it...
authorPaweł Gołaszewski <blues@pld-linux.org>
Mon, 7 Jun 2004 19:53:04 +0000 (19:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql.init -> 1.59

mysql.init

index 608ff7bae13fa171dac2228d13de0ee227bea1f0..7b4e3289a04d3c0e24912976ae8464c1cf32d65a 100644 (file)
@@ -102,7 +102,7 @@ mysqlgetconfig() {
                config_file=/etc/mysqld.conf
        fi
        
-       config=`grep -v \"^#\" /etc/mysql/clusters.conf | grep \"$clusterdir$\" | cut -s -f 1 -d '='`
+       config=`grep -v \"^#\" /etc/mysql/clusters.conf | grep "${clusterdir}$" | cut -s -f 1 -d '='`
        if [ -f "$config" ]; then
                config_file=$config
        elif [ -f /etc/mysql/$config ]; then
@@ -112,7 +112,12 @@ mysqlgetconfig() {
        fi
 
        MYSQL_CLUSTER_DIR="$clusterdir"; export MYSQL_CLUSTER_DIR
-       MYSQL_CONFIG="$config_file"; export MYSQL_CONFIG
+       if [ ! "$config_file" ]; then
+               nls "Error: Can't find config file for %s cluster" "$clusterdir"
+               exit 6
+       else
+               MYSQL_CONFIG="$config_file"; export MYSQL_CONFIG
+       fi
        if [ ! -f "$config_file" ]; then
                nls "Error: config file %s not found" "$config_file"
                nls "MySQL can't be run. Did you initialize DB by doing \`$0 init'?"
This page took 0.043859 seconds and 4 git commands to generate.