Merge "Added split by endline to avoid grep fail on restricted symbols."

This commit is contained in:
Mikhail Polenchuk 2013-03-22 12:47:39 +04:00 committed by Gerrit Code Review
commit 21c3cae54a

View File

@ -2,7 +2,7 @@
result = "true"
if File.exists?("/etc/mysql/conf.d/wsrep.cnf")
if open("/etc/mysql/conf.d/wsrep.cnf").read.grep(/^\s*wsrep_cluster_address=[\"\']gcomm:\/\/\s*[\"\']\s*/).any?
if open("/etc/mysql/conf.d/wsrep.cnf").read.split("\n").grep(/^\s*wsrep_cluster_address=[\"\']gcomm:\/\/\s*[\"\']\s*/).any?
result="true"
else
result="false"