summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index e4f04002f09..b84c141df9a 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -795,6 +795,7 @@ init (xlator_t *this)
" ,errno = %d", dirname, errno);
exit (1);
}
+
first_time = 1;
}
@@ -977,6 +978,15 @@ init (xlator_t *this)
if (ret < 0)
goto out;
+ if (first_time) {
+ ret = glusterd_store_create_hooks_directory (dirname);
+ if (-1 == ret) {
+ gf_log (this->name, GF_LOG_CRITICAL,
+ "Unable to create hooks directory ");
+ exit (1);
+ }
+ }
+
INIT_LIST_HEAD (&conf->mount_specs);
dict_foreach (this->options, _install_mount_spec, &ret);
if (ret)