Package: rsyslog
Version: 3.18.2-1
Severity: important
Tags: patch
Hi,
Youhei SASAKI, a Japanese Debian contributor, reports that he
uninstalled rsyslog but log rotation for rsyslog keeps performed after
that and cron sends him a failure notice each time. So, I have created
a patch to rename /etc/logrotate.d/rsyslog to
/etc/logrotate.d/rsyslog.disabled in postrm and resurrect the config
file after reinstallation in preinst, based on maintainer scripts for
syslog-ng. Could you please check and apply the attached patch?
I think it would be better to incorporate this fix in lenny since the
system log daemon defaults to rsyslog in lenny.
Thanks,
-nori
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable'), (90, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP)
>From e1b22eb94c60daff34ffa1be5d7fa2886cdaa6f3 Mon Sep 17 00:00:00 2001
From: Noritada Kobayashi <[EMAIL PROTECTED]>
Date: Mon, 29 Sep 2008 18:12:06 +0900
Subject: [PATCH] Disable and re-enable log rotation in postrm and preinst,
respectively.
Since the postrotate processes of log rotation for rsyslog call the init
script for rsyslog, log rotation fails with error when the script is not
present.
* debian/rsyslog.postrm
- Rename /etc/logrotate.d/rsyslog to /etc/logrotate.d/rsyslog.disabled
when removing the package.
- Remove /etc/logrotate.d/rsyslog.disabled when purging and replacing
the package.
* debian/rsyslog.preinst
- Rename /etc/logrotate.d/rsyslog.disabled to /etc/logrotate.d/rsyslog
when reinstalling.
---
debian/rsyslog.postrm | 15 +++++++++++++++
debian/rsyslog.preinst | 11 +++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
create mode 100644 debian/rsyslog.postrm
create mode 100644 debian/rsyslog.preinst
diff --git a/debian/rsyslog.postrm b/debian/rsyslog.postrm
new file mode 100644
index 0000000..c73927b
--- /dev/null
+++ b/debian/rsyslog.postrm
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ]; then
+ [ -f /etc/logrotate.d/rsyslog ] && mv -f /etc/logrotate.d/rsyslog
/etc/logrotate.d/rsyslog.disabled
+fi
+
+if [ "$1" = "purge" -o "$1" = "dissappear" ]; then
+ [ -f /etc/logrotate.d/rsyslog.disabled ] && rm -f
/etc/logrotate.d/rsyslog.disabled
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rsyslog.preinst b/debian/rsyslog.preinst
new file mode 100644
index 0000000..ef0f856
--- /dev/null
+++ b/debian/rsyslog.preinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "install" -a -n "$2" ] ; then
+ [ -f /etc/logrotate.d/rsyslog.disabled ] && mv -f
/etc/logrotate.d/rsyslog.disabled /etc/logrotate.d/rsyslog
+fi
+
+#DEBHELPER#
+
+exit 0
--
1.5.6.5