Package: logrotate
Version: 3.7.8-6
Severity: normal

Hi,

It seems that the notifempty option is not taken into account and the 
postrotate script is ran on empty files.

A way to reproduce it:

Consider the /etc/logrotate.d/test:
/root/test/logs/*.log {
        create 0640 root root
        dateext
        daily
        rotate 35
        missingok
        compress
        delaycompress
        notifempty
        postrotate
            echo "arguments: $@"
        endscript
}

# mkdir -p /root/test/logs
# touch /root/test/logs/test1.log
# echo 'hello' > /root/test/logs/test2.log


Rotation:
# logrotate /etc/logrotate.d/test -f                       
arguments:
arguments: /root/test/logs/test2.log-20111222

I didn't find such behaviour on Lenny.

Regards,

Rémi

-- Package-specific info:
Contents of /etc/logrotate.d
total 44
-rw-r--r-- 1 root root  173 Apr 15  2011 apt
-rw-r--r-- 1 root root   79 Aug 11 01:35 aptitude
-rw-r--r-- 1 root root  232 Apr 26  2011 dpkg
-rw-r--r-- 1 root root  146 May 12  2011 exim4-base
-rw-r--r-- 1 root root  126 May 12  2011 exim4-paniclog
-rw-r--r-- 1 root root  120 Oct  5  2010 munin-node
-rw-r--r-- 1 root root  868 Dec 22 11:37 netlogs-syslog-ng
-rw-r--r-- 1 root root  251 Dec 22 11:54 netlogs-syslog-ng-test2
-rw-r--r-- 1 root root  666 Jan 11  2011 ocsinventory-agent
-rw-r--r-- 1 root root  515 Nov 30  2010 rsyslog.disabled
-rw-r--r-- 1 root root 1565 Feb  1  2011 syslog-ng


-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages logrotate depends on:
ii  base-passwd                   3.5.22     Debian base system master password
ii  cron                          3.0pl1-116 process scheduling daemon
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libpopt0                      1.16-1     lib for parsing cmdline parameters
ii  libselinux1                   2.0.96-1   SELinux runtime shared libraries

Versions of packages logrotate recommends:
ii  heirloom-mailx [mailx]        12.4-2     feature-rich BSD mail(1)

logrotate suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to