diff options
| -rw-r--r-- | xlators/mgmt/glusterd/src/Makefile.am | 3 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 4 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 2 | 
3 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am index 81e542d65f3..e13742a661d 100644 --- a/xlators/mgmt/glusterd/src/Makefile.am +++ b/xlators/mgmt/glusterd/src/Makefile.am @@ -15,7 +15,8 @@ noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h glusterd-sm.h \  AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\  	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)\  	-I$(rpclibdir) -L$(xlatordir)/ -I$(CONTRIBDIR)/rbtree -I$(top_srcdir)/rpc/xdr/src\ -	-I$(top_srcdir)/rpc/rpc-lib/src -I$(CONTRIBDIR)/uuid -DGFS_PREFIX=\"$(prefix)\" +	-I$(top_srcdir)/rpc/rpc-lib/src -I$(CONTRIBDIR)/uuid -DGFS_PREFIX=\"$(prefix)\" \ +	-DDATADIR=\"$(localstatedir)\"  CLEANFILES = diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 0003fbef519..c9db4b09d8d 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -307,10 +307,10 @@ init (xlator_t *this)          }          snprintf (voldir, PATH_MAX, "%s/logs", dirname); -        ret = mkdir (voldir, 0777); +        ret = symlink (DEFAULT_LOG_FILE_DIRECTORY, voldir);          if ((-1 == ret) && (errno != EEXIST)) {                  gf_log (this->name, GF_LOG_CRITICAL, -                        "Unable to create logs directory %s" +                        "Unable to create symlink to logs directory %s"                          " ,errno = %d", voldir, errno);                  exit (1);          } diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index ac30d3e5c38..9769a95ad2b 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -48,7 +48,7 @@  #define GLUSTERD_MAX_VOLUME_NAME        1000 - +#define DEFAULT_LOG_FILE_DIRECTORY      DATADIR "/log/glusterfs"  struct glusterd_store_iter_ {          int     fd;  | 
