Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259086 - mail-filter/amavisd-new-2.6.1-r1 status shows "crashed" under openrc-0.4.3-r1
Summary: mail-filter/amavisd-new-2.6.1-r1 status shows "crashed" under openrc-0.4.3-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-15 13:36 UTC by Ian Pickworth
Modified: 2009-03-07 14:06 UTC (History)
1 user (show)

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


Attachments
Patch to /etc/init.d/amavisd (t.patch,368 bytes, patch)
2009-02-15 13:39 UTC, Ian Pickworth
Details | Diff
Patch to /etc/init.d/amavisd (t.patch,368 bytes, patch)
2009-02-15 13:41 UTC, Ian Pickworth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Pickworth 2009-02-15 13:36:12 UTC
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.
Comment 1 Ian Pickworth 2009-02-15 13:39:36 UTC
Created attachment 182124 [details, diff]
Patch to /etc/init.d/amavisd

Adds the --pidfile parameter to the start() function
Comment 2 Ian Pickworth 2009-02-15 13:41:34 UTC
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.
Comment 3 Daniel Pielmeier gentoo-dev 2009-02-15 13:53:08 UTC
(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.
Comment 4 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-07 14:06:46 UTC
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 $?
 }