[Pkg-icecast-devel] Bug#522703: logrotate postrotate script causes errors when icecast2 not running
John Morrissey
jwm at horde.net
Mon Apr 6 00:17:49 UTC 2009
Package: icecast2
Version: 2.3.2-2
Severity: normal
icecast2's logrotate postrotate script tries to do the right thing when the
daemon isn't running:
pgrep icecast2 >/dev/null && invoke-rc.d --quiet icecast2 reload > /dev/null
However, since shell lists return the exitcode of the last executed portion,
pgrep(1)'s exit code of 1 is returned and causes logrotate output:
/etc/cron.daily/logrotate:
error: error running postrotate script for /var/log/icecast2/error.log
run-parts: /etc/cron.daily/logrotate exited with return code 1
This uglier version fixes this:
! pgrep icecast2 >/dev/null || invoke-rc.d --quiet icecast2 reload > /dev/null
but is logically unwieldy. Might be better to use a full-blown if statement.
-- System Information:
Debian Release: 5.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: alpha
Kernel: Linux 2.6.18-6-alpha-smp (SMP w/1 CPU core)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages icecast2 depends on:
ii adduser 3.110 add and remove users and groups
ii libc6.1 2.7-18 GNU C Library: Shared libraries
ii libcurl3-gnutls 7.18.2-8lenny2 Multi-protocol file transfer libra
ii libogg0 1.1.3-4 Ogg Bitstream Library
ii libspeex1 1.2~rc1-1 The Speex codec runtime library
ii libtheora0 1.0~beta3-1 The Theora Video Compression Codec
ii libvorbis0a 1.2.0.dfsg-3.1 The Vorbis General Audio Compressi
ii libxml2 2.6.32.dfsg-5 GNOME XML library
ii libxslt1.1 1.1.24-2 XSLT processing library - runtime
Versions of packages icecast2 recommends:
pn ices2 <none> (no description available)
icecast2 suggests no packages.
-- no debconf information
More information about the Pkg-icecast-devel
mailing list