diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-replace-brick.c | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 | ||||
-rw-r--r-- | xlators/protocol/server/src/Makefile.am | 3 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c index 8bd9a1529f1..c4e26c13291 100644 --- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c +++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c @@ -27,7 +27,8 @@ #include <signal.h> #define GLUSTERD_GET_RB_MNTPT(path, len, volinfo) \ - snprintf (path, len, "/tmp/%s-"RB_CLIENT_MOUNTPOINT, \ + snprintf (path, len, \ + DEFAULT_VAR_RUN_DIRECTORY"/%s-"RB_CLIENT_MOUNTPOINT, \ volinfo->volname); diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index b68ba252ebc..b1be28b18ce 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -5700,7 +5700,7 @@ glusterd_brick_statedump (glusterd_volinfo_t *volinfo, } snprintf (dumpoptions_path, sizeof (dumpoptions_path), - "/tmp/glusterdump.%d.options", pid); + DEFAULT_VAR_RUN_DIRECTORY"/glusterdump.%d.options", pid); ret = glusterd_set_dump_options (dumpoptions_path, options, option_cnt); if (ret < 0) { gf_log ("", GF_LOG_ERROR, "error while parsing the statedump " @@ -5773,7 +5773,7 @@ glusterd_nfs_statedump (char *options, int option_cnt, char **op_errstr) } snprintf (dumpoptions_path, sizeof (dumpoptions_path), - "/tmp/glusterdump.%d.options", pid); + DEFAULT_VAR_RUN_DIRECTORY"/glusterdump.%d.options", pid); ret = glusterd_set_dump_options (dumpoptions_path, options, option_cnt); if (ret < 0) { gf_log ("", GF_LOG_ERROR, "error while parsing the statedump " diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am index c7ac3817211..cdb0f0277eb 100644 --- a/xlators/protocol/server/src/Makefile.am +++ b/xlators/protocol/server/src/Makefile.am @@ -20,6 +20,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \ -I$(top_srcdir)/rpc/rpc-lib/src/ \ -I$(top_srcdir)/rpc/xdr/src/ -AM_CFLAGS = -Wall $(GF_CFLAGS) +AM_CFLAGS = -Wall $(GF_CFLAGS) \ + -DDATADIR=\"$(localstatedir)\" CLEANFILES = *~ diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 5cc27ce60e9..9e60febfb53 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -1276,7 +1276,7 @@ struct volume_options options[] = { }, { .key = {"statedump-path"}, .type = GF_OPTION_TYPE_PATH, - .default_value = "/tmp", + .default_value = DEFAULT_VAR_RUN_DIRECTORY, .description = "Specifies directory in which gluster should save its" " statedumps. By default it is the /tmp directory" }, |