diff options
Diffstat (limited to 'glusterfsd')
| -rw-r--r-- | glusterfsd/src/Makefile.am | 3 | ||||
| -rw-r--r-- | glusterfsd/src/glusterfsd.c | 10 | ||||
| -rw-r--r-- | glusterfsd/src/glusterfsd.h | 1 | 
3 files changed, 11 insertions, 3 deletions
diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am index 1c67e1cf1..f185f982c 100644 --- a/glusterfsd/src/Makefile.am +++ b/glusterfsd/src/Makefile.am @@ -22,9 +22,12 @@ $(top_builddir)/libglusterfs/src/libglusterfs.la:  uninstall-local:  	rm -f $(DESTDIR)$(sbindir)/glusterfs +	rm -f $(DESTDIR)$(sbindir)/glusterd  install-data-local:  	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run  	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs  	rm -f $(DESTDIR)$(sbindir)/glusterfs +	rm -f $(DESTDIR)$(sbindir)/glusterd  	ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs +	ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterd diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 76d07af77..29debda4b 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -657,9 +657,9 @@ generate_uuid ()          return gf_strdup (tmp_str);  } -#define GF_SERVER_PROCESS 0 -#define GF_CLIENT_PROCESS 1 - +#define GF_SERVER_PROCESS   0 +#define GF_CLIENT_PROCESS   1 +#define GF_GLUSTERD_PROCESS 2  static uint8_t  gf_get_process_mode (char *exec_name) @@ -672,6 +672,8 @@ gf_get_process_mode (char *exec_name)          if (!strncmp (base, "glusterfsd", 10)) {                  ret = GF_SERVER_PROCESS; +        } else if (!strncmp (base, "glusterd", 8)) { +                ret = GF_GLUSTERD_PROCESS;          } else {                  ret = GF_CLIENT_PROCESS;          } @@ -872,6 +874,8 @@ parse_cmdline (int argc, char *argv[], cmd_args_t *cmd_args)              && (cmd_args->volfile == NULL)) {                  if (process_mode == GF_SERVER_PROCESS)                          cmd_args->volfile = gf_strdup (DEFAULT_SERVER_VOLFILE); +                else if (process_mode == GF_GLUSTERD_PROCESS) +                        cmd_args->volfile = gf_strdup (DEFAULT_GLUSTERD_VOLFILE);                  else                          cmd_args->volfile = gf_strdup (DEFAULT_CLIENT_VOLFILE);          } diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h index d67d181e1..7827c9800 100644 --- a/glusterfsd/src/glusterfsd.h +++ b/glusterfsd/src/glusterfsd.h @@ -27,6 +27,7 @@  #include "glusterfsd-common.h" +#define DEFAULT_GLUSTERD_VOLFILE              CONFDIR "/glusterd.vol"  #define DEFAULT_CLIENT_VOLFILE                CONFDIR "/glusterfs.vol"  #define DEFAULT_SERVER_VOLFILE                CONFDIR "/glusterfsd.vol"  #define DEFAULT_LOG_FILE_DIRECTORY            DATADIR "/log/glusterfs"  | 
