summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-02-24 00:08:46 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-03-01 02:06:09 -0800
commit7e546e16925e50dc33db05c67b8b5cad1b3922ef (patch)
tree2bcd9af33edb868b3690828a70edb0c3abc37604
parenta3ab0ad1f1c0a5574ae294f5d72aac4df8f50124 (diff)
Gsync : Do not expose volume gsync, when geo-replication is disabled
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
-rw-r--r--cli/src/Makefile.am3
-rw-r--r--cli/src/cli-cmd-volume.c3
-rw-r--r--configure.ac6
3 files changed, 8 insertions, 4 deletions
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index f2a03030f1f..2847f5d7859 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -16,7 +16,8 @@ AM_CFLAGS = -fPIC -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\
-I$(top_srcdir)/rpc/xdr/src\
-DDATADIR=\"$(localstatedir)\" \
-DCONFDIR=\"$(sysconfdir)/glusterfs\" $(GF_GLUSTERFS_CFLAGS)\
- -DGSYNCD_PREFIX=\"$(libexecdir)\"
+ -DGSYNCD_PREFIX=\"$(libexecdir)\"\
+ -DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE)
CLEANFILES =
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 5039fa2dd48..9e93d4e973c 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1002,10 +1002,11 @@ struct cli_cmd volume_cmds[] = {
cli_cmd_volume_reset_cbk,
"reset all the reconfigured options"},
+#if (SYNCDAEMON_COMPILE)
{"volume gsync <start|stop|configure> <MASTER> <SLAVE> [options]",
cli_cmd_volume_gsync_set_cbk,
"Geo-sync operations"},
-
+#endif
{ NULL, NULL, NULL }
};
diff --git a/configure.ac b/configure.ac
index 1a261a2404a..d2f686f1a66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,9 +296,11 @@ case $host_os in
enable_georeplication=no
;;
esac
-
+SYNCDAEMON_COMPILE=0
if test "x$enable_georeplication" != "xno"; then
SYNCDAEMON_SUBDIR=utils
+ SYNCDAEMON_COMPILE=1
+
BUILD_SYNCDAEMON="yes"
AM_PATH_PYTHON([2.4])
echo -n "checking if python is python 2.x... "
@@ -316,7 +318,7 @@ if test "x$enable_georeplication" != "xno"; then
AC_MSG_ERROR([python does not have ctypes support])
fi
fi
-
+AC_SUBST(SYNCDAEMON_COMPILE)
AC_SUBST(SYNCDAEMON_SUBDIR)
# end SYNCDAEMON section