Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345905 - app-admin/syslog-ng: init.d script use of pidfile
Summary: app-admin/syslog-ng: init.d script use of pidfile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Mr. Bones. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 373583
  Show dependency tree
 
Reported: 2010-11-17 16:33 UTC by JY
Modified: 2011-10-20 21:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JY 2010-11-17 16:33:06 UTC
syslog-ng initscript does not use environment variables to locate its PIDFILE (hardcoded in script instead of using /etc/conf.d/syslog-ng) and does not pass the pidfile as argument to syslog

Works in the default case because syslog-ng has /var/run/syslog-ng.pid as default path for pidfile.

Reproducible: Always

Steps to Reproduce:
0. stop syslog-ng
1. change all instances of "/var/run/syslog-ng.pid" to "/var/run/syslog-ng-2.pid" in /etc/init.d/syslog-ng
2. /etc/init.d/syslog-ng start 
3. /etc/init.d/syslog-ng stop


Actual Results:  
syslog-ng is still up

Expected Results:  
syslog-ng should have been stopped

syslog-ng still write its pidfile file to /var/run/syslog-ng.pid

Options which should have been passed to syslog-ng
  -p, --pidfile=<pidfile>            Set path to pid file


an optional SYSLOG_NG_PIDFILE configuration variable should be added with default value "/var/run/syslog-ng.pid"

syslog-ng options should be adjusted as follow :
SYSLOG_NG_OPTS="$SYSLOG_NG_OPTS --pidfile $SYSLOG_NG_PIDFILE"
and all hardcoded instances of pidfile in /etc/init.d/syslog-ng should use $SYSLOG_NG_PIDFILE

same thing for SYSLOG_NG_CONFIGFILE which should default to /etc/syslog-ng/syslog-ng.conf and be passed as argument to syslog-ng with --cfgfile=
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2011-01-19 17:38:21 UTC
Why?  Please explain the point of that change.  Is there some additional functionality you're hoping for?
Comment 2 JY 2011-01-19 18:45:23 UTC
(In reply to comment #1)
> Why?  Please explain the point of that change.  Is there some additional
> functionality you're hoping for?
> 
Cleanness and parametrability for easier customisation are the main points here.
It's useful only when you would like to avoid modifying initscripts.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2011-10-20 21:39:56 UTC
Covered by the changes for bug #373583