Project

General

Profile

Actions

Bug #1700

closed

rc.lighttpd.redhat does not work on rhel 5 with non-standard pid file location and chroot

Added by jrabbit over 16 years ago. Updated about 16 years ago.

Status:
Invalid
Priority:
Normal
Category:
documentation
Target version:
ASK QUESTIONS IN Forums:

Description

In the following situation:

1. Centos/RHEL Version 5 (Tested on 5.1, assuming it affects 5.0 too, does not happen on 4.6)

2. server.pid-file is set in the configuration file to be somewhere other than /var/run/lighttpd.pid

3. Chroot is being used

The rc.lighttpd.redhat fails to detect a running copy of lighttpd as it cannot find the pid. This is because the __pids_pidof function in /etc/rc.d/init.d/functions has been changed between RHEL 4 and RHEL 5 to use "pidof -c" instead of just "pidof" which means it will only find processes running in the same root folder. When lighttpd runs with chroot, this is not the case, so unless the pid file is in /var/run/lighttpd.pid, it is not found.

It can be fixed by manually including the old version of the function in the script below the inclusion of /etc/rc.d/init.d/functions to override the version defined in that file.

__pids_pidof() {
pidof -o $$ -o $PPID -o %PPID -x "$1" || \
pidof -o $$ -o $PPID -o %PPID -x "${1##*/}"
}

Actions #1

Updated by jrabbit over 16 years ago

(note: there should be a double underscore on the front of the function name pids_pidof - trac took it as a formatting command)

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

I don't see why that should be a bug in lighty - looks more like a bug in rhel.

And i don't think we should include this function.

Actions #3

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom