rpms/net-snmp/devel net-snmp.spec, 1.139, 1.140 net-snmpd.init, 1.4, 1.5 net-snmptrapd.init, 1.3, 1.4
Jan Šafránek (jsafrane)
fedora-extras-commits at redhat.com
Mon Jan 28 12:49:59 UTC 2008
- Previous message (by thread): rpms/kdebase/F-7 post-3.5.8-kdebase-kdm.diff, NONE, 1.1 kdebase.spec, 1.267, 1.268
- Next message (by thread): rpms/vym/EL-5 vym-1.10.0-dir-vars.patch, NONE, 1.1 vym-1.10.0-docdir-searchList.patch, NONE, 1.1 vym-1.10.0-xdg-open.patch, NONE, 1.1 sources, 1.2, 1.3 vym.spec, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jsafrane
Update of /cvs/pkgs/rpms/net-snmp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8376
Modified Files:
net-snmp.spec net-snmpd.init net-snmptrapd.init
Log Message:
init scripts made LSB compliant
Resolves: #246995
Index: net-snmp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- net-snmp.spec 5 Dec 2007 09:39:53 -0000 1.139
+++ net-snmp.spec 28 Jan 2008 12:49:25 -0000 1.140
@@ -7,7 +7,7 @@
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: %{major_ver}
-Release: 7%{?dist}
+Release: 8%{?dist}
Epoch: 1
License: BSD and CMU
@@ -379,6 +379,9 @@
%{_libdir}/lib*.so.*
%changelog
+* Mon Jan 28 2008 Jan Safranek <jsafranek at redhat.com> 5.4.1-8
+- init scripts made LSB compliant
+
* Wed Dec 5 2007 Jan Safranek <jsafranek at redhat.com> 5.4.1-7
- rebuild for openssl soname bump
Index: net-snmpd.init
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmpd.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- net-snmpd.init 25 Jun 2007 09:33:00 -0000 1.4
+++ net-snmpd.init 28 Jan 2008 12:49:25 -0000 1.5
@@ -9,6 +9,18 @@
# config: /usr/share/snmp/snmpd.conf
# pidfile: /var/run/snmpd.pid
+### BEGIN INIT INFO
+# Provides: snmpd
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Should-Start:
+# Should-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: start and stop Net-SNMP daemon
+# Description: Simple Network Management Protocol (SNMP) Daemon
+### END INIT INFO
+
# source function library
. /etc/init.d/functions
@@ -20,14 +32,17 @@
RETVAL=0
prog="snmpd"
+binary=/usr/sbin/snmpd
+pidfile=/var/run/snmpd.pid
start() {
+ [ -x $binary ] || exit 5
echo -n $"Starting $prog: "
if [ $UID -ne 0 ]; then
RETVAL=1
failure
else
- daemon /usr/sbin/snmpd $OPTIONS
+ daemon --pidfile=$pidfile $binary $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmpd
fi;
@@ -41,7 +56,7 @@
RETVAL=1
failure
else
- killproc /usr/sbin/snmpd
+ killproc -p $pidfile $binary
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/snmpd
fi;
@@ -51,7 +66,7 @@
reload(){
echo -n $"Reloading $prog: "
- killproc /usr/sbin/snmpd -HUP
+ killproc -p $pidfile $binary -HUP
RETVAL=$?
echo
return $RETVAL
@@ -70,18 +85,23 @@
case "$1" in
start)
start
+ RETVAL=$?
;;
stop)
stop
+ RETVAL=$?
;;
restart)
restart
+ RETVAL=$?
;;
reload)
reload
+ RETVAL=$?
;;
- condrestart)
+ condrestart|try-restart)
condrestart
+ RETVAL=$?
;;
status)
status snmpd
@@ -89,7 +109,7 @@
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
- RETVAL=1
+ RETVAL=2
esac
exit $RETVAL
Index: net-snmptrapd.init
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmptrapd.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- net-snmptrapd.init 12 Jul 2006 12:32:23 -0000 1.3
+++ net-snmptrapd.init 28 Jan 2008 12:49:25 -0000 1.4
@@ -9,7 +9,20 @@
# config: /etc/snmp/snmptrapd.conf
# config: /usr/share/snmp/snmptrapd.conf
# pidfile: /var/run/snmptrapd.pid
-#
+
+
+### BEGIN INIT INFO
+# Provides: snmptrapd
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Should-Start:
+# Should-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: start and stop Net-SNMP trap daemon
+# Description: Simple Network Management Protocol (SNMP) trap daemon
+### END INIT INFO
+
# source function library
. /etc/init.d/functions
@@ -21,10 +34,13 @@
RETVAL=0
prog="snmptrapd"
+binary=/usr/sbin/snmptrapd
+pidfile=/var/run/snmptrapd.pid
start() {
+ [ -x $binary ] || exit 5
echo -n $"Starting $prog: "
- daemon /usr/sbin/snmptrapd $OPTIONS
+ daemon --pidfile=$pidfile /usr/sbin/snmptrapd $OPTIONS
RETVAL=$?
echo
touch /var/lock/subsys/snmptrapd
@@ -33,7 +49,7 @@
stop() {
echo -n $"Stopping $prog: "
- killproc /usr/sbin/snmptrapd
+ killproc -p $pidfile /usr/sbin/snmptrapd
RETVAL=$?
echo
rm -f /var/lock/subsys/snmptrapd
@@ -58,18 +74,23 @@
case "$1" in
start)
start
+ RETVAL=$?
;;
stop)
stop
+ RETVAL=$?
;;
restart)
restart
+ RETVAL=$?
;;
reload)
reload
+ RETVAL=$?
;;
- condrestart)
+ condrestart|try-restart)
condrestart
+ RETVAL=$?
;;
status)
status snmptrapd
@@ -77,7 +98,7 @@
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
- RETVAL=1
+ RETVAL=2
esac
exit $RETVAL
- Previous message (by thread): rpms/kdebase/F-7 post-3.5.8-kdebase-kdm.diff, NONE, 1.1 kdebase.spec, 1.267, 1.268
- Next message (by thread): rpms/vym/EL-5 vym-1.10.0-dir-vars.patch, NONE, 1.1 vym-1.10.0-docdir-searchList.patch, NONE, 1.1 vym-1.10.0-xdg-open.patch, NONE, 1.1 sources, 1.2, 1.3 vym.spec, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list