You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/04/28 00:09:55 UTC

[Bug 4287] New: spamassassin init script always exits with 0

http://bugzilla.spamassassin.org/show_bug.cgi?id=4287

           Summary: spamassassin init script always exits with 0
           Product: Spamassassin
           Version: 3.0.2
          Platform: Other
               URL: http://www.ravencore.com/
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Tools
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: corman@cormander.com


On RedHat FC3 the init script /etc/rc.d/init.d/spamassassin has at the bottom of
the file:

exit 0

when it really should be:

exit $RETVAL

because by convention, redhat init scripts edit with the status of the command
they run. I checked the spec file, and the file that this is from the
spamassassin tarball is:

spamd/redhat-rc-script.sh

I noticed this bug because I'm developing a control panel (
http://www.ravencore.com/ ), and its init script has startall / stopall options
that start/stop services based on the exit stats of the other service's init script.

It never detects spamassassin as "not running", because the spamassassin init
script always exits with 0, but any other redhat service works because they exit
with $RETVAL. This is a simple change that I'd greatly appriciate to be part of
the next release.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] [review] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287


parkerm@pobox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |can be committed






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From duncf@debian.org  2005-04-27 16:37 -------
Subject: Re:  spamassassin init script always exits with 0

> If we retain this in 3.0.3, then if the user modified the script before, it
> overwrite the script with this new fixed version.  I *think* it is safe to
> remove the "noreplace" because there is no good reason for users to be editing
> this script anymore (unlike during 2.x when they used to need to to change options.)

Ick. You're on your own on that one, Debian poicy forbids packages to
touch anything thats been modified in /etc/ without permission. :-)




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287


felicity@kluge.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |trivial
   Target Milestone|Undefined                   |3.0.3






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] [review] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287


felicity@kluge.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From felicity@kluge.net  2005-05-17 22:10 -------
committed for 3.0.4, r170708



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287


wtogami@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From wtogami@redhat.com  2005-04-27 16:03 -------
+1 (and actually tested too)




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From felicity@kluge.net  2005-04-27 15:52 -------
committed to 3.1, btw, r165061



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] [review] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287


parkerm@pobox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|spamassassin init script    |[review] spamassassin init
                   |always exits with 0         |script always exits with 0
   Target Milestone|3.0.3                       |3.0.4




------- Additional Comments From parkerm@pobox.com  2005-04-27 17:44 -------
Please review for 3.0.4



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] [review] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From parkerm@pobox.com  2005-04-27 18:15 -------
+1



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From jm@jmason.org  2005-04-27 16:47 -------
yeah, I think that's a Red Hat-specific change; other platforms may not have the
/etc/sysconfig dir so may have to edit the script to set options etc...



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From jm@jmason.org  2005-04-27 16:49 -------
+1 btw



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From wtogami@redhat.com  2005-04-27 15:45 -------
Nice catch.  Too bad you didn't report this yesterday or it would have been in
3.0.3 tarball.  I'm patching Fedora's SRPM for now.

Can we commit this in trunk and 3.0 (just in case we ever do a 3.0.4).



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] [review] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From maddenj+spamassassin@skynet.ie  2005-04-28 02:11 -------
(In reply to comment #7)
> yeah, I think that's a Red Hat-specific change; other platforms may not have the
> /etc/sysconfig dir so may have to edit the script to set options etc...

Just as FYI, Debian has /etc/default/ for adding command line options for initrd
scripts.

AFAIK also, if dpkg is due to overwrite a file in /etc/ that you've manually
editted, it tells you. Default action is not to overwrite.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From felicity@kluge.net  2005-04-27 15:51 -------
Created an attachment (id=2813)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2813&action=view)
suggested path




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4287] spamassassin init script always exits with 0

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4287





------- Additional Comments From wtogami@redhat.com  2005-04-27 16:08 -------
Red Hat's spamassassin.spec contains:
%config(noreplace) %{_initrddir}/spamassassin

If we retain this in 3.0.3, then if the user modified the script before, it
overwrite the script with this new fixed version.  I *think* it is safe to
remove the "noreplace" because there is no good reason for users to be editing
this script anymore (unlike during 2.x when they used to need to to change options.)

Anyone see any reason not to remove "noreplace"?  Yeah not the same issue as
this bug, but it could cause baffling situations where an upgraded package still
returns "0" all the time if we don't.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.