goto fail;
}
+ setenv("CTDB_DBDIR_STATE", rec->ctdb->db_directory_state, 1);
+
if (!ctdb_vfork_with_logging(state, rec->ctdb, "recovery", prog, nargs,
args, NULL, NULL, &state->pid)) {
DEBUG(DEBUG_ERR,
const char *db_path,
uint32_t hash_size, bool persistent)
{
+ static char *db_dir_state = NULL;
struct recdb_context *recdb;
unsigned int tdb_flags;
return NULL;
}
+ if (db_dir_state == NULL) {
+ db_dir_state = getenv("CTDB_DBDIR_STATE");
+ }
+
recdb->db_name = db_name;
recdb->db_id = db_id;
recdb->db_path = talloc_asprintf(recdb, "%s/recdb.%s",
- dirname(discard_const(db_path)),
+ db_dir_state != NULL ?
+ db_dir_state :
+ dirname(discard_const(db_path)),
db_name);
if (recdb->db_path == NULL) {
talloc_free(recdb);