Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 432964

Summary: www-servers/apache - init.d script fails to detect server check/startup problem
Product: Gentoo Linux Reporter: Sergey S. Starikoff <Ikonta>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: hendrik, mail, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Sergey S. Starikoff 2012-08-27 12:19:26 UTC
While analysing issue, described in https://bugs.gentoo.org/show_bug.cgi?id=432962 I've find the following issue:

# /etc/init.d/apache2 stop
 * Stopping apache2 ...
apache2: Syntax error on line 155 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib64/apache2/modules/libphp5.so into server: /usr/lib64/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory                                                                  [ ok ]
# /etc/init.d/apache2 status
 * status: stopped

But (after rebuild php):
# /etc/init.d/apache2 start
 * Starting apache2 ...
 * start-stop-daemon: /usr/sbin/apache2 is already running                                                        [ ok ]

I.e. start-stop-daemon reports, that apache daemon status is "started", so previously reported by init script status ("stopped") is not correct.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-24 09:52:02 UTC
Does this problem still exist in >=www-servers/apache-2.2.25? I did some rework of apache's init script and might have already addressed this problem.
Comment 2 Sergey S. Starikoff 2014-04-24 10:55:20 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #1)
> Does this problem still exist in >=www-servers/apache-2.2.25? I did some
> rework of apache's init script and might have already addressed this problem.

=www-servers/apache-2.2.27

Placing into /etc/apache2/httpd.conf the test line with fake module:
LoadModule test modules/test.so

made
/etc/init.d/apache2 stop
command fail (apache is not marked as stopped).

So, return codes are handled correctly, the bug looks to be fixed.