]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- fix mysql 4.1.1 migration trigger where one has leading space in cluster definition
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Jul 2005 13:27:26 +0000 (13:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql.spec -> 1.289

mysql.spec

index d74435d7faf843f055d5db02043df2dc31fd3a46..2c5b25739ae78c1a479719fbb2745c597dd41a2e 100644 (file)
@@ -24,7 +24,7 @@ Summary(zh_CN):       MySQL
 Name:          mysql
 Group:         Applications/Databases
 Version:       4.1.12
-Release:       2
+Release:       2.1
 License:       GPL + MySQL FLOSS Exception
 Source0:       http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
 # Source0-md5: 56a6f5cacd97ae290e07bbe19f279af1
@@ -670,13 +670,18 @@ fi
 
 %triggerpostun -- mysql <= 4.1.1
 # For better compatibility with prevoius versions:
-for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
+for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf | xargs); do
        if echo "$config" | grep -q '^/'; then
                config_file="$config"
        elif [ -f "/etc/mysql/$config" ]; then
                config_file=/etc/mysql/$config
        else
                clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
+               if [ -z "$clusterdir" ]; then
+                       echo >&2 "Can't find cluster dir for $config!"
+                       echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
+                       exit 1
+               fi
                config_file="$clusterdir/mysqld.conf"
        fi
        echo "Adding option old-passwords to config: $config_file"
This page took 0.05119 seconds and 4 git commands to generate.