Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
logrotate
logrotate-3.7.8-suse.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File logrotate-3.7.8-suse.patch of Package logrotate
Index: Makefile =================================================================== --- Makefile.orig +++ Makefile @@ -81,7 +81,7 @@ ifneq ($(STATEFILE),) endif BINDIR = $(BASEDIR)/sbin -MANDIR ?= $(BASEDIR)/man +MANDIR ?= $(BASEDIR)/share/man #-------------------------------------------------------------------------- Index: examples/logrotate.cron =================================================================== --- examples/logrotate.cron.orig +++ examples/logrotate.cron @@ -1,8 +1,23 @@ #!/bin/sh -/usr/sbin/logrotate /etc/logrotate.conf -EXITVALUE=$? -if [ $EXITVALUE != 0 ]; then - /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" +# exit immediately if there is another instance running +if checkproc /usr/sbin/logrotate; then + /bin/logger -p cron.warning -t logrotate "ALERT another instance of logrotate is running - exiting" + exit 1 fi + +TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX` + +/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF +EXITVALUE=${PIPESTATUS[0]} + +if [ $EXITVALUE != 0 ]; then + # wait a sec, we might just have restarted syslog + sleep 1 + # tell what went wrong + /bin/logger -p cron.warning -t logrotate "ALERT exited abnormally with [$EXITVALUE]" + /bin/logger -p cron.warning -t logrotate -f $TMPF + fi + +rm -f $TMPF exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor