SOURCES: net-snmptrapd.init - fixed force-reload, added try-restart
qboosh
qboosh at pld-linux.org
Tue Nov 4 23:08:20 CET 2008
Author: qboosh Date: Tue Nov 4 22:08:20 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fixed force-reload, added try-restart
---- Files affected:
SOURCES:
net-snmptrapd.init (1.9 -> 1.10)
---- Diffs:
================================================================
Index: SOURCES/net-snmptrapd.init
diff -u SOURCES/net-snmptrapd.init:1.9 SOURCES/net-snmptrapd.init:1.10
--- SOURCES/net-snmptrapd.init:1.9 Wed Nov 14 12:00:35 2007
+++ SOURCES/net-snmptrapd.init Tue Nov 4 23:08:15 2008
@@ -55,6 +55,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/snmptrapd ]; then
+ stop
+ start
+ else
+ msg_not_running "snmptrapd"
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -64,16 +74,22 @@
stop)
stop
;;
- restart|force-reload)
+ restart)
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
status)
status snmptrapd
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/net-snmptrapd.init?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list