mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
ctdb-tools: No longer honour CTDB_NODES environment variable
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
6cf861a544
commit
dedc9eab92
@ -479,17 +479,14 @@ static struct ctdb_node_map *read_nodes_file(TALLOC_CTX *mem_ctx, uint32_t pnn)
|
||||
struct ctdb_node_map *nodemap;
|
||||
const char *nodes_list = NULL;
|
||||
|
||||
nodes_list = getenv("CTDB_NODES");
|
||||
const char *basedir = getenv("CTDB_BASE");
|
||||
if (basedir == NULL) {
|
||||
basedir = CTDB_ETCDIR;
|
||||
}
|
||||
nodes_list = talloc_asprintf(mem_ctx, "%s/nodes", basedir);
|
||||
if (nodes_list == NULL) {
|
||||
const char *basedir = getenv("CTDB_BASE");
|
||||
if (basedir == NULL) {
|
||||
basedir = CTDB_ETCDIR;
|
||||
}
|
||||
nodes_list = talloc_asprintf(mem_ctx, "%s/nodes", basedir);
|
||||
if (nodes_list == NULL) {
|
||||
fprintf(stderr, "Memory allocation error\n");
|
||||
return NULL;
|
||||
}
|
||||
fprintf(stderr, "Memory allocation error\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nodemap = ctdb_read_nodes_file(mem_ctx, nodes_list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user