apache2ctl returns 0 on connection refused

Bug #322461 reported by Joe McDonagh
Affects Status Importance Assigned to Milestone
apache (Ubuntu)

Bug Description

Description: Ubuntu 8.04.2
Release: 8.04

apache2.2-common 2.2.8-1ubuntu0.3

What I expect to happen: When running apache2ctl status, I expect that an error such as "connection refused" will cause the script to exit with a !0 return code.

What happens instead:


The problem is at apache2ctl's line 112:

    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '

It's a bashism, but you want to set ERROR after this pipeline to PIPESTATUS array's 0th element, since that awk command is pretty much always going to exit 0. This is probably upstream, but I reported it here anyways... since apache is cross-many platforms that may not have bash, I doubt they'd go for using the pipestatus array.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers