{
TALLOC_CTX *tmp_ctx;
struct ctdb_context *ctdb;
+ const char *ctdb_socket;
int ret;
bool status;
uint64_t srvid_offset;
goto fail;
}
+ ctdb_socket = getenv("CTDB_SOCKET");
+ if (ctdb_socket != NULL) {
+ options.socket = ctdb_socket;
+ }
+
ret = ctdb_client_init(ctdb, ctdb->ev, options.socket, &ctdb->client);
if (ret != 0) {
fprintf(stderr, "Failed to connect to CTDB daemon (%s)\n",
const char **extra_argv;
int extra_argc;
const struct ctdb_cmd *cmd;
- const char *ctdb_socket;
int loglevel;
int ret;
options.maxruntime = 0;
options.pnn = -1;
- ctdb_socket = getenv("CTDB_SOCKET");
- if (ctdb_socket != NULL) {
- options.socket = ctdb_socket;
- }
-
pc = poptGetContext(argv[0], argc, argv, cmdline_options,
POPT_CONTEXT_KEEP_FIRST);
while ((opt = poptGetNextOpt(pc)) != -1) {