[SCM] CTDB repository - branch master updated - ctdb-1.13-314-gf92b9c8
Amitay Isaacs
amitay at samba.org
Sat Oct 20 08:41:44 MDT 2012
The branch, master has been updated
via f92b9c83a2f39fba9a141417a88de96fc8c592ff (commit)
from 7d025281ee70c91ebcd4d9a908de1045a689786b (commit)
http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f92b9c83a2f39fba9a141417a88de96fc8c592ff
Author: David Disseldorp <ddiss at samba.org>
Date: Thu Oct 18 16:55:19 2012 +0200
Build: Set the default ctdb socket path at configure time
The ctdb socket path currently defaults to /tmp/ctdb.socket and can be
modified at runtime using the --socket=filename option, common to both
ctdb and ctdbd binaries.
This change allows the default path to be set at configure time using
the --with-socketpath=FILE argument. When not specified, the default
path remains /tmp/ctdb.socket, documentation remains unchanged as a
result.
Signed-off-by: David Disseldorp <ddiss at samba.org>
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 2 ++
configure.ac | 11 +++++++++++
include/ctdb_protocol.h | 4 ++--
3 files changed, 15 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/Makefile.in b/Makefile.in
index 0e365f6..efc6622 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,6 +16,7 @@ sbindir = @sbindir@
mandir = @mandir@
localstatedir = @localstatedir@
logdir = @LOGDIR@
+sockpath = @SOCKPATH@
VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@:@teventdir@:
srcdir = @srcdir@
etcdir = @sysconfdir@
@@ -51,6 +52,7 @@ CFLAGS=@CPPFLAGS@ -g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir)
$(TALLOC_CFLAGS) $(TEVENT_CFLAGS) $(TDB_CFLAGS) -I at libreplacedir@ \
-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
-DLOGDIR=\"$(logdir)\" \
+ -DSOCKPATH=\"$(sockpath)\" \
-DUSE_MMAP=1 -DTEVENT_DEPRECATED_QUIET=1 @CFLAGS@ -Wno-format-zero-length $(POPT_CFLAGS) \
-fPIC
diff --git a/configure.ac b/configure.ac
index 50d20a0..85934a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,17 @@ if test ! -z "$LOGDIR"; then
fi
AC_SUBST(LOGDIR)
+SOCKPATH='/tmp/ctdb.socket'
+AC_ARG_WITH([socketpath],
+ [ --with-socketpath=FILE path to CTDB daemon socket [[/tmp/ctdb.socket]]],
+ SOCKPATH=$withval)
+if test ! -z "$SOCKPATH"; then
+ if test "$SOCKPATH" = "yes" -o "$SOCKPATH" = "no"; then
+ AC_MSG_ERROR([--with-socketpath must specify a file path])
+ fi
+fi
+AC_SUBST(SOCKPATH)
+
AC_CONFIG_HEADER(config.h)
EXTRA_OBJ=""
diff --git a/include/ctdb_protocol.h b/include/ctdb_protocol.h
index 14b44d5..022a8fe 100644
--- a/include/ctdb_protocol.h
+++ b/include/ctdb_protocol.h
@@ -20,8 +20,8 @@
#ifndef _CTDB_PROTOCOL_H
#define _CTDB_PROTOCOL_H
-/* location of daemon socket */
-#define CTDB_PATH "/tmp/ctdb.socket"
+/* location of daemon socket, set at configure time */
+#define CTDB_PATH SOCKPATH
/* default ctdb port number */
#define CTDB_PORT 4379
--
CTDB repository
More information about the samba-cvs
mailing list