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

Bug#330275: apache2: init script exits with 0 when called incorrectly



Package: apache2
Version: 2.0.54-4
Severity: normal
Tags: patch

Apache2's init script does not support a 'restart' option, but when it
is called with that option, it mistakenly exits with a return code of 0,
instead of a code indicating failure.  According to the LSB, it should
exit with a 4:

http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/iniscrptact.html

At the very least, when it prints the usage message it should exit with
a non-zero code unless '-h' or '--help' was specifically called for.  At
this point, the init script provides the false impression that it has
checked that apache is running correctly, when in fact it has done no
such thing.  This works fine when doing things manually, but it fails
miserably with any kind of automation.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-k7-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages apache2 depends on:
ii  apache2-mpm-prefork           2.0.54-4   traditional model for Apache2

apache2 recommends no packages.

-- no debconf information
141d140
<         exit 4

Reply to: