apache2ctl returns 0 on connection refused

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

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:

http://www.pastie.org/373460

The problem is at apache2ctl's line 112:

status)
    $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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.