[PATCH] [CTDB] configurable logging directory
Michael Adam
obnox at samba.org
Wed Feb 4 00:05:41 GMT 2009
Hi Mathieu and Ronnie,
after discussion with Mathieu on IRC, I have pushed a couple of
patches to git://git.samba.org/obnox/ctdb.git
(http://git.samba.org/?p=obnox/ctdb.git):
1. a typofix (of a typofix) in events 41.httpd
2. a tested and slightly fixed version of the patch of this mail
to make logdir configurable
3. a subsequent patch that prints out the default in the help
for --with-logdir in configure
4. a patch adding a "showlayout" target to Makefile.in
5. a patch to 41.httpd that makes this work on rhel, suse and
debian/ubutu systems (similar to the previous patch to
50.samba)
6. one fix (popt.h include in smnotify) by Mathieu
7. a fix to the ctdb.1 manpage by Mathieu
Cheers - Michael
PS: Ronnie, why the separation of xml and formatted man pages?
Mathieu Parent wrote:
> Hi,
>
> Attached is a patch to have configurable logging directory for CTDB.
> I have already submitted it
> (http://lists.samba.org/archive/samba-technical/2008-October/061534.html).
>
> It is intended to distribution specific path (Debian logdir is
> /var/log, localstatedir is /var/lib/ctdb).
>
> Regards
>
> Mathieu Parent
> From b957c35d0451733e14c5af7eeb5e66653e7a8c8b Mon Sep 17 00:00:00 2001
> From: Mathieu Parent <math.parent at gmail.com>
> Date: Sun, 21 Dec 2008 20:46:16 +0100
> Subject: [PATCH] [CTDB] configurable logging directory
>
> ---
> Makefile.in | 2 ++
> configure.ac | 11 +++++++++++
> server/ctdbd.c | 2 +-
> 3 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile.in b/Makefile.in
> index f7b4fb9..609d872 100755
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -12,6 +12,7 @@ bindir = @bindir@
> sbindir = @sbindir@
> mandir = @mandir@
> localstatedir = @localstatedir@
> +LOGDIR = @LOGDIR@
> VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
> srcdir = @srcdir@
> etcdir = @sysconfdir@
> @@ -30,6 +31,7 @@ IPQ_LIBS = @IPQ_LIBS@
> CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
> -I at tallocdir@ -I at tdbdir@/include -I at libreplacedir@ \
> -DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
> + -DLOGDIR=\"$(logdir)\" \
> -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS)
>
> LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@ @CTDB_PCAP_LDFLAGS@
> diff --git a/configure.ac b/configure.ac
> index d552eed..1a5f013 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -37,6 +37,17 @@ if test "$ac_cv_prog_gcc" = yes; then
> CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
> fi
>
> +LOGDIR='${prefix}/var/log'
> +AC_ARG_WITH([logdir],
> + [ --with-logdir=DIR path to log directory],
> + LOGDIR=$withval)
> +if test ! -z "$LOGDIR"; then
> + if test "$LOGDIR" = "yes" -o "$LOGDIR" = "no"; then
> + AC_MSG_ERROR([--with-logdir must specify a path])
> + fi
> +fi
> +AC_SUBST(LOGDIR)
> +
> AC_CONFIG_HEADER(config.h)
>
> EXTRA_OBJ=""
> diff --git a/server/ctdbd.c b/server/ctdbd.c
> index 351948c..32410c5 100644
> --- a/server/ctdbd.c
> +++ b/server/ctdbd.c
> @@ -52,7 +52,7 @@ static struct {
> .nlist = ETCDIR "/ctdb/nodes",
> .transport = "tcp",
> .event_script_dir = ETCDIR "/ctdb/events.d",
> - .logfile = VARDIR "/log/log.ctdb",
> + .logfile = LOGDIR "/log.ctdb",
> .db_dir = VARDIR "/ctdb",
> .db_dir_persistent = VARDIR "/ctdb/persistent",
> .script_log_level = DEBUG_ERR,
> --
> 1.5.6.5
--
Michael Adam <ma at sernet.de> <obnox at samba.org>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090204/28d4449e/attachment.bin
More information about the samba-technical
mailing list