LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

LDIRECTORD: Make check_sql < 80col wide

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: LDIRECTORD: Make check_sql < 80col wide
Cc: Roberto Nibali <rnibali@xxxxxxxxx>
Cc: J.Libak@xxxxxxxxxx
Cc: Roberto Nibali <ratz@xxxxxxxxxxxx>
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 24 Apr 2007 19:02:00 +0900
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/


<Prev in Thread] Current Thread [Next in Thread>