packages: cvsnt/cvsnt-cvslockd.init - unify, cleanups
glen
glen at pld-linux.org
Mon Jan 24 18:22:06 CET 2011
Author: glen Date: Mon Jan 24 17:22:06 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- unify, cleanups
---- Files affected:
packages/cvsnt:
cvsnt-cvslockd.init (1.4 -> 1.5)
---- Diffs:
================================================================
Index: packages/cvsnt/cvsnt-cvslockd.init
diff -u packages/cvsnt/cvsnt-cvslockd.init:1.4 packages/cvsnt/cvsnt-cvslockd.init:1.5
--- packages/cvsnt/cvsnt-cvslockd.init:1.4 Wed Mar 26 07:20:18 2008
+++ packages/cvsnt/cvsnt-cvslockd.init Mon Jan 24 18:22:01 2011
@@ -19,64 +19,53 @@
start() {
# Start daemons.
- if [ ! -f /var/lock/subsys/cvslockd ]; then
- msg_starting cvslockd
- daemon cvslockd
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cvslockd
- else
- msg_already_running cvslockd
+ if [ -f /var/lock/subsys/cvslockd ]; then
+ msg_already_running "cvslockd"
+ return
fi
+
+ msg_starting "cvslockd"
+ daemon /usr/bin/cvslockd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cvslockd
}
stop() {
# Stop daemons.
- if [ -f /var/lock/subsys/cvslockd ]; then
- msg_stopping cvslockd
- killproc cvslockd
- rm -f /var/lock/subsys/cvslockd >/dev/null 2>&1
- else
- msg_not_running cvslockd
+ if [ ! -f /var/lock/subsys/cvslockd ]; then
+ msg_not_running "cvslockd"
+ return
fi
-}
-reload() {
- if [ -f /var/lock/subsys/cvslockd ]; then
- msg_reloading cvslockd
- killproc cvslockd -HUP
- RETVAL=$?
- else
- msg_not_running cvslockd
- RETVAL=7
- fi
+ msg_stopping "cvslockd"
+ killproc cvslockd
+ rm -f /var/lock/subsys/cvslockd >/dev/null 2>&1
}
condrestart() {
- if [ -f /var/lock/subsys/cvslockd ]; then
- stop
- start
- else
- msg_not_running cvslockd
+ if [ ! -f /var/lock/subsys/cvslockd ]; then
+ msg_not_running "cvslockd"
RETVAL=$1
+ return
fi
+
+ stop
+ start
}
RETVAL=0
# See how we were called.
case "$1" in
start)
- start
+ start
;;
stop)
- stop
+ stop
;;
restart)
stop
start
;;
-# reload|force-reload)
-# reload
-# ;;
try-restart)
condrestart 0
;;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cvsnt/cvsnt-cvslockd.init?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list