packages (MYSQL_5_1): mysql/mysql.init Follow glen's suggestions and fix st...

wiget wiget at pld-linux.org
Thu Dec 16 01:02:51 CET 2010


Author: wiget                        Date: Thu Dec 16 00:02:51 2010 GMT
Module: packages                      Tag: MYSQL_5_1
---- Log message:
Follow glen's suggestions and fix strippig space/tabs from $1

---- Files affected:
packages/mysql:
   mysql.init (1.144 -> 1.144.2.1) 

---- Diffs:

================================================================
Index: packages/mysql/mysql.init
diff -u packages/mysql/mysql.init:1.144 packages/mysql/mysql.init:1.144.2.1
--- packages/mysql/mysql.init:1.144	Mon Dec 13 16:09:11 2010
+++ packages/mysql/mysql.init	Thu Dec 16 01:02:46 2010
@@ -196,8 +196,8 @@
 		gsub(/\r$/, "");
 
 		# trim spaces
-		gsub(/^[\t ]*|[\t ]*$/, "", $1);
-		gsub(/^[\t ]*|[\t ]*$/, "", $2);
+		gsub(/^[\t ]+|[\t ]+$/, "", $1);
+		gsub(/^[\t ]+|[\t ]+$/, "", $2);
 	}
 
 	# skip comments and empty lines
@@ -210,21 +210,21 @@
 	}
 
 	section == "mysqld" {
-		if ($1 ~ /^datadir[ \t]*$/) {
+		if ($1 == "datadir") {
 			printf("MYSQL_DATA_DIR=%s;", $2);
-		} else if ($1 ~ /^user[ \t]*$/) {
+		} else if ($1 == "user") {
 			printf("MYSQL_USER=%s;", $2);
-		} else if ($1 ~ /^pid-file[ \t]*$/) {
+		} else if ($1 == "pid-file") {
 			printf("MYSQL_PIDFILE=%s;", $2);
-		} else if ($1 ~ /^socket[ \t]*$/) {
+		} else if ($1 == "socket") {
 			printf("MYSQL_SOCKET=%s;", $2);
-		} else if ($1 ~ /^port[ \t]*$/) {
+		} else if ($1 == "port") {
 			printf("MYSQL_PORT=%s;", $2);
-		} else if ($1 ~ /^bind-address[ \t]*$/) {
+		} else if ($1 == "bind-address") {
 			printf("MYSQL_BIND_ADDRESS=%s;", $2);
-		} else if ($1 ~ /^skip-networking[ \t]*$/) {
+		} else if ($1 == "skip-networking") {
 			printf("MYSQL_SKIP_NETWORKING=1;");
-		} else if ($1 ~ /^log-error[ \t]*$/) {
+		} else if ($1 == "log-error") {
 			printf("MYSQL_LOG_ERROR=%s;", $2);
 		}
 	}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql.init?r1=1.144&r2=1.144.2.1&f=u



More information about the pld-cvs-commit mailing list