Use /var/run/ctdb/ctdbd.socket because there might be other daemons
that need sockets in the future.
The local daemons test code to create a link for the default
convenience socket has to be removed because the link can't be created
as a regular user in the new location. This should be OK since all
calls to the ctdb tool in the test code should be wrapped in onnode.
When debugging tests, a developer will have to set CTDB_SOCKET by
hand.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-programmed-with: Martin Schwenke <martin@meltin.net>
# CTDB_EVENT_SCRIPT_DIR=/etc/ctdb/events.d
# the location of the local ctdb socket
-# defaults to /tmp/ctdb.socket
-# CTDB_SOCKET=/tmp/ctdb.socket
+# defaults to /var/run/ctdb/ctdbd.socket
+# CTDB_SOCKET=/var/run/ctdb/ctdbd.socket
# what transport to use. Only tcp is currently supported
# defaults to tcp
fi
AC_SUBST(LOGDIR)
-SOCKPATH='/tmp/ctdb.socket'
+SOCKPATH='${localstatedir}/run/ctdb/ctdbd.socket'
AC_ARG_WITH([socketpath],
- [ --with-socketpath=FILE path to CTDB daemon socket [[/tmp/ctdb.socket]]],
+ [ --with-socketpath=FILE path to CTDB daemon socket [[LOCALSTATEDIR/run/ctdb/ctdbd.socket]]],
SOCKPATH=$withval)
if test ! -z "$SOCKPATH"; then
if test "$SOCKPATH" = "yes" -o "$SOCKPATH" = "no"; then
#ifdef SOCKPATH
#define CTDB_PATH SOCKPATH
#else
-#define CTDB_PATH "/tmp/ctdb.socket"
+#define CTDB_PATH "/var/run/ctdb/ctdbd.socket"
#endif
/* default ctdb port number */
for i in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
daemons_start_1 $i "$@"
done
-
- if [ -L /tmp/ctdb.socket -o ! -S /tmp/ctdb.socket ] ; then
- ln -sf "${TEST_VAR_DIR}/sock.0" /tmp/ctdb.socket || return 1
- fi
}
#######################################