Cc: Roberto Nibali <ratz@xxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
Index: heartbeat/ldirectord/ldirectord.in
===================================================================
--- heartbeat.orig/ldirectord/ldirectord.in 2007-04-24 17:42:11.000000000
+0900
+++ heartbeat/ldirectord/ldirectord.in 2007-04-24 18:19:51.000000000 +0900
@@ -2495,12 +2495,16 @@ sub check_sql
$query =~ s#^/##;
unless ($$v{login} && $query) {
service_set($v, $r, "down");
- &ld_log("Error: Must specify a login and request string for
mysql and postgresql checks. Not adding $$r{server}.\n");
+ &ld_log("Error: Must specify a login and request string " .
+ "for MySQL and PostgreSQL checks. " .
+ "Not adding $$r{server}.\n");
return 1;
}
$result=2; # Set result flag. Only ok if ends up at zero.
&ld_debug(2, "Checking $$v{server} server=$$r{server} port=$port\n");
- $dbh =
DBI->connect("dbi:$dbd:$dbname=$$v{database};host=$$r{server};port=$port",
$$v{login}, $$v{passwd});
+ $dbh = DBI->connect("dbi:$dbd:$dbname=$$v{database};" .
+ "host=$$r{server};port=$port", $$v{login},
+ $$v{passwd});
unless ($dbh) {
&ld_debug(4, "Failed to bind to $$r{server} with $dbh->err");
service_set($v, $r, "down");
--
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
|