Dont initialize the domain socket for commands that do not require/use
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 25 Aug 2010 00:39:33 +0000 (10:39 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 25 Aug 2010 00:39:33 +0000 (10:39 +1000)
the daemon

tools/ctdb.c

index 52b5626b455ed4e299fe347d1b0e61bef0780ed8..b4e951624981e0da79bc1d9862e16a7b117b3da9 100644 (file)
@@ -4798,12 +4798,12 @@ int main(int argc, const char *argv[])
                                close(2);
                        }
 
-                       /* initialise ctdb */
-                       ctdb = ctdb_cmdline_client(ev);
-
                        if (ctdb_commands[i].without_daemon == false) {
                                const char *socket_name;
 
+                               /* initialise ctdb */
+                               ctdb = ctdb_cmdline_client(ev);
+
                                if (ctdb == NULL) {
                                        DEBUG(DEBUG_ERR, ("Failed to init ctdb\n"));
                                        exit(1);