summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2012-09-06 03:11:12 +0200
committerAnand Avati <avati@redhat.com>2012-09-09 21:10:19 -0700
commit17ddf18ae17679117cee2033b010a72975525ef6 (patch)
tree0c64ebdeecab7b1119c40aa97740f2e2290f238c
parent87e88243e827d7c1dc5b5138ac966b41002564e4 (diff)
Honour configure --localstatedir and --sysconfdir
Makes sure /etc/glusterd to /var/lib/glusterd migration does nonour configure --localstatedir and --sysconfdir. Backport of I65a5f96424d67531e81e75b084265bd4e6e30f29 BUG: 764655 Change-Id: I71e0d3b7f0d27b490b591dcc92ddfe26fb8e818d Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3911 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--configure.ac2
-rw-r--r--xlators/mgmt/glusterd/src/Makefile.am7
2 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9f9ca9f..0b64774 100644
--- a/configure.ac
+++ b/configure.ac
@@ -549,7 +549,7 @@ AC_SUBST(INCLUDES)
AM_CONDITIONAL([GF_DARWIN_HOST_OS], test "${GF_HOST_OS}" = "GF_DARWIN_HOST_OS")
-AM_CONDITIONAL([GF_INSTALL_VAR_LIB_GLUSTERD], test ! -d /var/lib/glusterd && test -d /etc/glusterd )
+AM_CONDITIONAL([GF_INSTALL_VAR_LIB_GLUSTERD], test ! -d ${localstatedir}/lib/glusterd && test -d ${sysconfdir}/glusterd )
AC_OUTPUT
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 485350b..79e10a3 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -34,7 +34,8 @@ CLEANFILES =
install-data-hook:
if GF_INSTALL_VAR_LIB_GLUSTERD
- $(mkdir_p) /var/lib/
- (stat /etc/glusterd && mv /etc/glusterd /var/lib/) || true;
- (ln -sf /var/lib/glusterd /etc/glusterd) || true;
+ $(mkdir_p) $(localstatedir)/lib/
+ (stat $(sysconfdir)/glusterd && \
+ mv $(sysconfdir)/glusterd $(localstatedir)/lib/) || true;
+ (ln -sf $(localstatedir)/lib/glusterd $(sysconfdir)/glusterd) || true;
endif