[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#576105: apache2.2-common: logrotate configuration seems outdated



Package: apache2.2-common
Version: 2.2.14-7
Severity: minor
Tags: patch


I was looking at my /etc/logrotate.d/apache2 and noticed that there are some
interesting things done in the postrotate script section. Perhaps I'm missing
something, but it looks to me like the entire conditional can be thrown out, 
and for good measure the call to /etc/init.d/apache2 ought to be replaced with
invoke-rc.d. Here's a patch demonstrating my intent:

=== begin patch ===
diff -u a/apache2 b/apache2
--- a/apache2   2010-03-31 18:08:47.000000000 -0400
+++ b/apache2   2010-03-31 18:08:44.000000000 -0400
@@ -11,8 +11,6 @@
    create 640 root adm
    sharedscripts
    postrotate
-       if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
-           /etc/init.d/apache2 reload > /dev/null
-       fi
+       invoke-rc.d apache2 reload > /dev/null
    endscript
 }
=== end patch ===

My assumption is that the [ -f "foo" ] conditional exists to see if apache is
running before restarting it. If that assumption is valid, I would point out
that the init script that I've got from 2.2.14-7 gracefully exits with code 0 
and no error when apache is stopped and `invoke-rc.d apache2 reload` is called.

Never used reportbug before, so here's hoping it all works out.

Thanks for your time.

-- Package-specific info:
List of enabled modules from 'apache2 -M':
  alias auth_basic authn_file authz_default authz_groupfile
  authz_host authz_user autoindex cgid deflate dir env ldap mime
  negotiation setenvif ssl status userdir wsgi

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-xen-686 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages apache2.2-common depends on:
ii  apache2-utils                 2.2.14-7   utility programs for webservers
ii  apache2.2-bin                 2.2.14-7   Apache HTTP Server common binary f
ii  libmagic1                     5.04-1     File type determination library us
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  mime-support                  3.48-1     MIME files 'mime.types' & 'mailcap
ii  perl                          5.10.1-11  Larry Wall's Practical Extraction 
ii  procps                        1:3.2.8-8  /proc file system utilities

Versions of packages apache2.2-common recommends:
ii  ssl-cert                      1.0.25     simple debconf wrapper for OpenSSL

Versions of packages apache2.2-common suggests:
pn  apache2-doc            <none>            (no description available)
pn  apache2-suexec | apach <none>            (no description available)
ii  conkeror [www-browser] 0.9.1+git100220-1 keyboard focused web browser with 

Versions of packages apache2.2-common is related to:
pn  apache2-mpm-event             <none>     (no description available)
pn  apache2-mpm-itk               <none>     (no description available)
pn  apache2-mpm-prefork           <none>     (no description available)
ii  apache2-mpm-worker            2.2.14-7   Apache HTTP Server - high speed th

-- no debconf information



Reply to: