diff options
author | Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> | 2008-09-29 18:12:06 +0900 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2008-11-20 13:59:42 +0100 |
commit | 2678ae6c262308eb79540ce99a6123e3d3de8435 (patch) | |
tree | 73c321e4ce51afa25689551f26bb1e20498441ed /debian/rsyslog.preinst | |
parent | 6b3e2edffea397f3de7f190b490606279c3643ba (diff) | |
download | rsyslog-2678ae6c262308eb79540ce99a6123e3d3de8435.tar.gz |
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.
Diffstat (limited to 'debian/rsyslog.preinst')
-rw-r--r-- | debian/rsyslog.preinst | 11 |
1 files changed, 11 insertions, 0 deletions
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 |