main: Remove COROSYNC_RUN_DIR

Remove last used environment variable (reasons similar to removal of
COROSYNC_MAIN_CONFIG_FILE).

This environment variable was never documented, so document it properly.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
This commit is contained in:
Jan Friesse 2018-11-13 17:32:43 +01:00
parent f588c4ad4d
commit fec6bfd341
4 changed files with 14 additions and 6 deletions

View File

@ -597,6 +597,7 @@ static void remove_ro_entries(icmap_map_t temp_map)
delete_and_notify_if_changed(temp_map, "system.sched_rr");
delete_and_notify_if_changed(temp_map, "system.priority");
delete_and_notify_if_changed(temp_map, "system.qb_ipc_type");
delete_and_notify_if_changed(temp_map, "system.run_dir");
}
/*

View File

@ -45,6 +45,7 @@
#include <corosync/corotypes.h>
#include <corosync/corodefs.h>
#include <corosync/icmap.h>
#include <corosync/logsys.h>
#include "util.h"
@ -171,14 +172,13 @@ int cs_name_tisEqual (cs_name_t *str1, char *str2) {
const char *get_run_dir(void)
{
static char path[PATH_MAX] = {'\0'};
char *env_run_dir;
char *cmap_run_dir;
int res;
if (path[0] == '\0') {
env_run_dir = getenv("COROSYNC_RUN_DIR");
if (env_run_dir != NULL && env_run_dir[0] != '\0') {
res = snprintf(path, PATH_MAX, "%s", getenv("COROSYNC_RUN_DIR"));
if (icmap_get_string("system.run_dir", &cmap_run_dir) == CS_OK) {
res = snprintf(path, PATH_MAX, "%s", cmap_run_dir);
free(cmap_run_dir);
} else {
res = snprintf(path, PATH_MAX, "%s/%s", LOCALSTATEDIR, "lib/corosync");
}

View File

@ -83,7 +83,7 @@ const char * short_service_name_get(uint32_t service_id,
char *buf, size_t buf_size);
/*
* Return run directory (ether COROSYNC_RUN_DIR env or LOCALSTATEDIR/lib/corosync)
* Return run directory (ether icmap system.run_dir or LOCALSTATEDIR/lib/corosync)
*/
const char *get_run_dir(void);

View File

@ -748,6 +748,13 @@ Should be set to yes (default) if corosync should try to move itself to root
cgroup. This feature is available only for systems with cgroups with RT
sched enabled (Linux with CONFIG_RT_GROUP_SCHED kernel option).
.TP
run_dir
Existing directory where corosync should chdir into. Corosync stores
important state files and blackboxes there.
The default is /var/lib/corosync.
.PP
Within the
.B resources