rpms/spampd/devel spampd.init,1.1,1.2 spampd.spec,1.3,1.4

Matthias Saou thias at fedoraproject.org
Sun Apr 12 15:43:11 UTC 2009


Author: thias

Update of /cvs/extras/rpms/spampd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21879

Modified Files:
	spampd.init spampd.spec 
Log Message:
Update init script to the new style.



Index: spampd.init
===================================================================
RCS file: /cvs/extras/rpms/spampd/devel/spampd.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- spampd.init	12 Feb 2007 19:10:47 -0000	1.1
+++ spampd.init	12 Apr 2009 15:42:39 -0000	1.2
@@ -1,44 +1,56 @@
 #!/bin/sh
 #
-# This script starts and stops the spampd daemon
+# spampd       Transparent SMTP/LMTP proxy filter using spamassassin
 #
-# chkconfig: - 79 31
-#
-# description: spampd uses SpamAssassin to check email messages for SPAM.
+# chkconfig:   - 79 31
+# description: Spampd is a program used within an e-mail delivery system to \
+#              scan messages for possible Unsolicited Commercial E-mail (UCE, \
+#              aka spam) content. It uses SpamAssassin (SA) to do the actual \
+#              message scanning.
+
+### BEGIN INIT INFO
+# Provides: spampd
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Should-Start: 
+# Should-Stop: 
+# Default-Start: 
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: Transparent SMTP/LMTP proxy filter using spamassassin
+# Description:       Spampd is a program used within an e-mail delivery system
+#                    to scan messages for possible Unsolicited Commercial
+#                    E-mail (UCE, aka spam) content. It uses SpamAssassin (SA)
+#                    to do the actual message scanning.
+### END INIT INFO
 
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-# Source networking configuration.
-. /etc/sysconfig/network
-
-# Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
-
+exec="/usr/sbin/spampd"
 prog="spampd"
-OPTIONS="--user=spampd --group=spampd --tagall --local-only"
+options="--user=spampd --group=spampd --tagall --local-only"
 
-# Source an auxiliary options file if we have one, and pick up OPTIONS,
-if [ -r /etc/sysconfig/$prog ]; then
-    . /etc/sysconfig/$prog
-fi
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
-RETVAL=0
+lockfile=/var/lock/subsys/$prog
 
 start() {
+    [ -x $exec ] || exit 5
     echo -n $"Starting $prog: "
-    daemon $prog $OPTIONS
-    RETVAL=$?
+    daemon $exec $options
+    retval=$?
     echo
-    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+    [ $retval -eq 0 ] && touch $lockfile
+    return $retval
 }
 
 stop() {
     echo -n $"Stopping $prog: "
     killproc $prog
-    RETVAL=$?
+    retval=$?
     echo
-    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
 }
 
 restart() {
@@ -46,27 +58,52 @@
     start
 }
 
-# See how we were called.
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    status $prog
+}
+
+rh_status_q() {
+    rh_status &>/dev/null
+}
+
+
 case "$1" in
     start)
-        start
-    ;;
+        rh_status_q && exit 0
+        $1
+        ;;
     stop)
-        stop
-    ;;
+        rh_status_q || exit 0
+        $1
+        ;;
     restart)
-        restart
-    ;;
-    condrestart)
-        [ -f /var/lock/subsys/$prog ] && restart
-    ;;
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
     status)
-        status $prog
-    ;;
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
     *)
-        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
-        exit 1
+        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
 esac
-
-exit $RETVAL
+exit $?
 


Index: spampd.spec
===================================================================
RCS file: /cvs/extras/rpms/spampd/devel/spampd.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- spampd.spec	26 Feb 2009 02:19:20 -0000	1.3
+++ spampd.spec	12 Apr 2009 15:42:39 -0000	1.4
@@ -1,13 +1,14 @@
 Summary: Transparent SMTP/LMTP proxy filter using spamassassin
 Name: spampd
 Version: 2.30
-Release: 5
+Release: 6
 License: GPLv2+
 Group: System Environment/Daemons
 URL: http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm
 Source0: http://www.worlddesign.com/Content/rd/mta/spampd/spampd-%{version}.tar.gz
 Source1: spampd.init
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Requires(pre): /usr/sbin/useradd
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/service, /sbin/chkconfig
 Requires(postun): /sbin/service
@@ -82,7 +83,11 @@
 
 
 %changelog
-* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.30-5
+* Sun Apr 12 2009 Matthias Saou <http://freshrpms.net/> 2.30-6
+- Update init script to the new style.
+- Add missing Requires(pre): /usr/sbin/useradd.
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 
 * Mon Aug  6 2007 Matthias Saou <http://freshrpms.net/> 2.30-4




More information about the fedora-extras-commits mailing list