Cluster Project branch, master, updated. cluster-2.99.05-65-g98c1237
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".
The branch, master has been updated
via 98c12372432e994a5c8310d16a6dbb9f9295043b (commit)
from bcf64592c09e6dae7ed0a8d4310c4d267a20fce8 (commit)Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 98c12372432e994a5c8310d16a6dbb9f9295043b
Author: Fabio M. Di Nitto <[email protected]> Date: Fri Jul 11 08:58:17 2008 +0200
[MISC] Create and install logrotate file
With daemons writing their own log files, we want to rotate them properly.
Add logrotate snippet in doc/ for who wants to do it manually
Install it in logrotate dir (you will need to rerun configure for this to be set properly)
Adapt build system to propagate info around
-----------------------------------------------------------------------
Summary of changes:
configure | 7 +++++++ doc/Makefile | 11 ++++++++++- doc/cluster.logrotate.in | 8 ++++++++ make/defines.mk.input | 3 +++ make/install.mk | 4 ++++ make/uninstall.mk | 3 +++ 6 files changed, 35 insertions(+), 1 deletions(-) create mode 100644 doc/cluster.logrotate.in
configure +7 -0
@@ -73,6 +73,7 @@ my %options = ( sharedir => \$sharedir, docdir => \$docdir, logdir => \$logdir, + logrotatedir => \$logrotatedir, syslogfacility => \$syslogfacility, sysloglevel => \$sysloglevel, mibdir => \$mibdir,
@@ -155,6 +156,7 @@ my $err = &GetOptions (\%options, 'sharedir=s', 'docdir=s', 'logdir=s', + 'logrotatedir=s', 'syslogfacility=s', 'sysloglevel=s', 'mibdir=s',
@@ -201,6 +203,7 @@ if ($help || !$err) { print "--sharedir=\tthe base directory for misc cluster files. (Default: {prefix}/share/cluster)\n"; print "--docdir=\tthe base directory for misc cluster documentation files. (Default: {prefix}/share/doc/cluster)\n"; print "--logdir=\tthe base directory for cluster logging files. (Default: /var/log/cluster/)\n"; + print "--logrotatedir=\tthe base directory for logrorate.d files. (Default: /etc/logrotate.d/)\n"; print "--syslogfacility=\tset the default syslog facility. (Default: LOG_LOCAL4)\n"; print "--sysloglevel=\tset the default syslog level. (Default: LOG_LEVEL_INFO)\n"; print "--mibdir=\tthe base directory for snmp mibs. (Default: {prefix}/share/snmp/mibs)\n";
@@ -535,6 +538,9 @@ if (!$docdir) { if (!$logdir) { $logdir="/var/log/cluster"; } +if (!$logrotatedir) { + $logrotatedir="/etc/logrotate.d"; +} if (!$syslogfacility) { $syslogfacility="LOG_LOCAL4"; }
@@ -699,6 +705,7 @@ while (<IFILE>) { $_ =~ s/\@SHAREDIR\@/$sharedir/; $_ =~ s/\@DOCDIR\@/$docdir/; $_ =~ s/\@LOGDIR\@/$logdir/; + $_ =~ s/\@LOGROTATEDIR\@/$logrotatedir/; $_ =~ s/\@SYSLOGFACILITY\@/$syslogfacility/; $_ =~ s/\@SYSLOGLEVEL\@/$sysloglevel/; $_ =~ s/\@MIBDIR\@/$mibdir/;
doc/Makefile +10 -1
@@ -7,11 +7,20 @@ DOCS = gfs2.txt \ COPYRIGHT \ README.licence -all: +TARGET= cluster.logrotate + +LOGRORATED = $(TARGET) + +all: $(TARGET) include ../make/defines.mk include $(OBJDIR)/make/install.mk include $(OBJDIR)/make/uninstall.mk include $(OBJDIR)/make/clean.mk +$(TARGET): + cat $(S)/$(TARGET).in | sed \ + -e 's#@LOGDIR@#${LOGDIR}#g' \ + > $(TARGET) + clean: generalclean
doc/cluster.logrotate.in new file +8 -0
@@ -0,0 +1,8 @@ + at LOGDIR@/*log { + missingok + compress + notifempty + daily + rotate 7 + create 0600 root root +}
make/defines.mk.input +3 -0
@@ -6,6 +6,7 @@ libexecdir ?= ${DESTDIR}@LIBEXECDIR@ sharedir ?= ${DESTDIR}@SHAREDIR@ docdir ?= ${DESTDIR}@DOCDIR@ logdir ?= ${DESTDIR}@LOGDIR@ +logrotatedir ?= ${DESTDIR}@LOGROTATEDIR@ mandir ?= ${DESTDIR}@MANDIR@ module_dir ?= @MODULE_DIR@ incdir ?= ${DESTDIR}@INCDIR@
@@ -86,5 +87,7 @@ S=$(SRCDIR)/$(THISDIR) CONFDIR=@CONFDIR@ CONFFILE=@CONFFILE@ +LOGDIR=@LOGDIR@ + UNINSTALL = perl @SRCDIR@/scripts/uninstall.pl FENCEPARSE = bash @SRCDIR@/scripts/fenceparse
make/install.mk +4 -0
@@ -59,3 +59,7 @@ ifdef DOCS install -d ${docdir} install -m644 $(S)/${DOCS} ${docdir} endif +ifdef LOGRORATED + install -d ${logrotatedir} + install -m644 ${LOGRORATED} ${logrotatedir} +endif
make/uninstall.mk +3 -0
@@ -38,3 +38,6 @@ endif ifdef DOCS ${UNINSTALL} ${DOCS} ${docdir} endif +ifdef LOGRORATED + ${UNINSTALL} ${LOGRORATED} ${logrotatedir} +endif
hooks/post-receive
--
Cluster Project