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

This commit is contained in:
manashkin 2013-03-18 22:36:41 +04:00
parent b835c2eff1
commit 763bcc1613

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"