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

Bug 178772

Summary: [init.d] mail-filter/spamassassin-3.2.0 init.d incompatible with baselayout-2/openrc
Product: Gentoo Linux Reporter: Peter Alfredsen (RETIRED) <loki_val>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal CC: bugs+gentoo, cardoe, dberkholz, hollow, ingmar, roy, spock, uberlord
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Peter Alfredsen (RETIRED) gentoo-dev 2007-05-16 13:55:10 UTC
Having installed baselayout-2, spamassassin-3.2.0 errors when starting, but does actually start:
loki ~ # /etc/init.d/spamd start
 * Caching service dependencies ...                                                                                                                  [ ok ]
 * Starting spamd ...
 * start-stop-daemon: /usr/sbin/spamd died                                                                                                                 [ !! ]led to start spamd
 * ERROR: spamd failed to start
loki ~ # ps aux|grep spam
root     32584 15.5  2.8  34000 29620 ?        RNs  15:52   0:00 /usr/sbin/spamd -d -r /var/run/spamd.pid -m 5 -c -H
root     32588  0.0  2.6  34000 27908 ?        SN   15:52   0:00 spamd child
root     32589  0.0  2.6  34000 27800 ?        SN   15:52   0:00 spamd child
root     32593  0.0  0.0   2820   692 pts/4    R+   15:52   0:00 grep --colour=auto spam


Reproducible: Always
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-05-16 14:30:34 UTC
Try appending "--name spamd" to the start-stop-daemon options in the start() function.
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2007-05-16 15:15:19 UTC
That works:
loki ~ # /etc/init.d/spamd start
 * Starting spamd ...                                                                                                                                [ ok ]
loki ~ # ps aux|grep spam
root      7604 20.6  2.8  34000 29624 ?        SNs  17:12   0:00 /usr/sbin/spamd -d -r /var/run/spamd.pid -m 5 -c -H
root      7608  0.0  2.6  34000 27912 ?        SN   17:12   0:00 spamd child
root      7609  0.0  2.6  34000 27804 ?        SN   17:12   0:00 spamd child
root      7613  0.0  0.0   2820   688 pts/4    R+   17:12   0:00 grep --colour=auto spam
loki ~ # /etc/init.d/spamd stop
 * Stopping spamd ...                                                                                                                                [ ok ]
loki ~ # ps aux|grep spam
root      7626  0.0  0.0   2824   692 pts/4    R+   17:12   0:00 grep --colour=auto spam

I inserted the --name spamd thus:
        start-stop-daemon --start --quiet \
                --nicelevel ${SPAMD_NICELEVEL:-0} \
                --name spamd \
                --exec /usr/sbin/spamd -- -d -r ${PIDFILE} \
                        ${SPAMD_OPTS}
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-05-16 15:22:33 UTC
--nicelevel ${SPAMD_NICELEVEL:-0}

That should be removed.
baselayout-2 allows RC_SSD_NICELEVEL="19" in /etc/conf.d/foo to affect the nicelevel for ssd calls in service foo.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-02-27 18:48:47 UTC
(In reply to comment #3)
> --nicelevel ${SPAMD_NICELEVEL:-0}
> 
> That should be removed.
> baselayout-2 allows RC_SSD_NICELEVEL="19" in /etc/conf.d/foo to affect the
> nicelevel for ssd calls in service foo.

Well, ping!
 

Comment 5 Roy Marples 2008-02-28 13:53:14 UTC
Just a last note to say that openrc s-s-d has had a futher improvement. Basically you should specify the interpreter fully if not using pidfiles or process names.

start-stop-daemon --start --exec /usr/bin/perl -- /usr/bin/daemon.py

Infact, s-s-d now goes out of the way to die for you with a very descriptive error message about this and how to fix it :)
Comment 6 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-07 14:49:57 UTC
Looks like /this/ bug has been fixed. See bug 243474 for further discussion.