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

Bug 295394

Summary: Modify syslog-ng init script to specify pid for startup
Product: Gentoo Linux Reporter: Doug Warner <doug>
Component: New packagesAssignee: Mr. Bones. (RETIRED) <mr_bones_>
Status: RESOLVED FIXED    
Severity: normal CC: jer
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Doug Warner 2009-12-02 03:44:52 UTC
It would be helpful if the call to start-stop-daemon specified the pid file used for syslog-ng.  This would allow people to run multiple copies of syslog-ng simultaneously in order to take advantage of multiple processes when not using db-destinations (file, pipe, or program destinations are single-threaded only).

package: app-admin/syslog-ng-3.0.4

Reproducible: Always

Steps to Reproduce:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-12-03 18:06:43 UTC
Did you mean that it should be possible to set the pid to use in the conf.d script? Because it already does specify a pid to use in the init.d script.
Comment 2 Doug Warner 2009-12-03 20:34:14 UTC
In the start() part of the init script where start-stop-script is called, since the pid isn't specified to start-stop-script, running multiple copies of syslog-ng won't be allowed (start-stop-script sees another "syslog-ng" is running and won't start another one).

--- /etc/init.d/syslog-ng	2009-06-05 21:18:46.000000000 -0400
+++ syslog-ng	2009-12-03 15:32:52.000000000 -0500
@@ -36,7 +36,7 @@
 	checkconfig || return 1
 	ebegin "Starting syslog-ng"
 	[ -n "${SYSLOG_NG_OPTS}" ] && SYSLOG_NG_OPTS="-- ${SYSLOG_NG_OPTS}"
-	start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng ${SYSLOG_NG_OPTS}
+	start-stop-daemon --start -p /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng ${SYSLOG_NG_OPTS}
 	eend $? "Failed to start syslog-ng"
 }
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2009-12-30 08:41:27 UTC
added to the 3.0.5 init script