Using baselayout-2 and openrc-0.4.3.r1, status of a running amavisd instance is shown as "crashed". Reproducible: Always Steps to Reproduce: 1./etc/init.d/amavisd start 2./etc/init.d/amavisd status Expected Results: Should show "Started", since the service is running OK. Problem is fixed by adding a --pidfile parameter to the start-stop-daemon command in the /etc/init.d/amavisd start() function - to match tat in the stop() function.
Created attachment 182124 [details, diff] Patch to /etc/init.d/amavisd Adds the --pidfile parameter to the start() function
Created attachment 182125 [details, diff] Patch to /etc/init.d/amavisd Sorry, got the diff the wrong way round on the previous attachment :-( This is the patch adding --pidfile parameter to start() function.
(In reply to comment #0) > Using baselayout-2 and openrc-0.4.3.r1, status of a running amavisd instance is > shown as "crashed". > > Problem is fixed by adding a --pidfile parameter to the start-stop-daemon > command in the /etc/init.d/amavisd start() function - to match tat in the > stop() function. > Thanks for bringing this up. I have the same problem in bug #255423 and adding the pidfile to the start function fixes it.
Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v retrieving revision 1.134 diff -u -b -B -r1.134 ChangeLog --- ChangeLog 8 Dec 2008 16:56:37 -0000 1.134 +++ ChangeLog 7 Mar 2009 14:05:37 -0000 @@ -1,7 +1,11 @@ # ChangeLog for mail-filter/amavisd-new -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v 1.134 2008/12/08 16:56:37 dertobi123 Exp $ + 07 Mar 2009; Peter Alfredsen <loki_val@gentoo.org> files/amavisd.rc6: + Fix init.d for openrc. Bug 259086. Thanks to Ian Pickworth + <ian@pickworth.me.uk>. + 08 Dec 2008; Tobias Scherbaum <dertobi123@gentoo.org> -amavisd-new-2.5.2.ebuild, -amavisd-new-2.6.0.ebuild, -amavisd-new-2.6.1.ebuild: Index: files/amavisd.rc6 =================================================================== RCS file: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/files/amavisd.rc6,v retrieving revision 1.4 diff -u -b -B -r1.4 amavisd.rc6 --- files/amavisd.rc6 18 Jun 2007 16:03:06 -0000 1.4 +++ files/amavisd.rc6 7 Mar 2009 14:05:37 -0000 @@ -9,7 +9,8 @@ start() { ebegin "Starting amavisd-new" - start-stop-daemon --start --quiet --name amavisd --exec /usr/sbin/amavisd + start-stop-daemon --start --quiet --name amavisd --pidfile /var/amavis/amavisd.pid \ + --exec /usr/sbin/amavisd eend $? }