From: ankry Date: Tue, 20 May 2003 21:29:13 +0000 (+0000) Subject: - LSB conformance changes X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcoda.git;a=commitdiff_plain;h=5a8a8a34dbf2dbd214793ac33c5557356b60a52e - LSB conformance changes Changed files: coda.auth2.init -> 1.4 coda.codasrv.init -> 1.5 coda.update.init -> 1.5 coda.venus.init -> 1.5 --- diff --git a/coda.auth2.init b/coda.auth2.init index d0dec2c..d81fa1c 100644 --- a/coda.auth2.init +++ b/coda.auth2.init @@ -23,17 +23,17 @@ else exit 0 fi +RETVAL=0 case "$1" in start) # Check if the service is already running? - if [ -f /var/lock/subsys/auth2 ]; then - msg_already_running auth2 - exit 1 - else + if [ ! -f /var/lock/subsys/auth2 ]; then msg_starting auth2 daemon auth2 RETVAL=$? [ RETVAL -eq 0 ] && touch /var/lock/subsys/auth2 + else + msg_already_running auth2 fi ;; stop) @@ -43,20 +43,21 @@ case "$1" in rm -f /var/lock/subsys/auth2 else msg_not_running auth2 - exit 1 fi ;; status) + status auth2 + exit $? ;; - restart|reload) + restart|force-reload) $0 stop $0 start + exit $? ;; *) - msg_usage "$0 {start|stop|restart|reload|status}" - exit 1 + msg_usage "$0 {start|stop|restart|force-reload|status}" + exit 3 ;; esac exit $RETVAL - diff --git a/coda.codasrv.init b/coda.codasrv.init index 9074d04..3eca484 100644 --- a/coda.codasrv.init +++ b/coda.codasrv.init @@ -23,18 +23,18 @@ else exit 0 fi +RETVAL=0 case "$1" in start) # Check if the service is already running? - if [ -f /var/lock/subsys/codasrv ]; then - msg_already_running codasrv - exit 1 - else + if [ ! -f /var/lock/subsys/codasrv ]; then msg_starting codasrv startserver >/dev/null 2>&1 & - ok RETVAL=$? + ok [ RETVAL -eq 0 ] && touch /var/lock/subsys/codasrv + else + msg_already_running codasrv fi ;; stop) @@ -48,25 +48,23 @@ case "$1" in while [ -f /var/lib/vice/srv/pid ]; do sleep 1 done - deltext ok rm -f /var/lock/subsys/codasrv else msg_not_running codasrv - exit 1 fi ;; status) ;; - restart|reload) + restart|force-reload) $0 stop $0 start + exit $? ;; *) - msg_usage "$0 {start|stop|restart|reload|status}" - exit 1 + msg_usage "$0 {start|stop|restart|force-reload|status}" + exit 3 ;; esac exit $RETVAL - diff --git a/coda.update.init b/coda.update.init index d4ba044..7b5c898 100644 --- a/coda.update.init +++ b/coda.update.init @@ -23,21 +23,23 @@ else exit 0 fi +RETVAL=0 case "$1" in start) # Check if the service is already running? - if [ -f /var/lock/subsys/update ]; then - msg_already_running update - exit 1 - else + if [ ! -f /var/lock/subsys/update ]; then msg_starting rpc2portmap daemon rpc2portmap + RETVAL=$? msg_starting updatesrv daemon updatesrv + [ RETVAL -eq 0 ] && RETVAL=$? msg_starting updateclnt daemon updateclnt -h `cat /var/lib/vice/db/scm` - RETVAL=$? + [ RETVAL -eq 0 ] && RETVAL=$? [ RETVAL -eq 0 ] && touch /var/lock/subsys/update + else + msg_already_running update fi ;; stop) @@ -51,18 +53,18 @@ case "$1" in rm -f /var/lock/subsys/update else msg_not_running update - exit 1 fi ;; status) ;; - restart|reload) + restart|force-reload) $0 stop $0 start + exit $? ;; *) - msg_usage "$0 {start|stop|restart|reload|status}" - exit 1 + msg_usage "$0 {start|stop|restart|force-reload|status}" + exit 3 ;; esac diff --git a/coda.venus.init b/coda.venus.init index 56d08f4..fcba5fa 100644 --- a/coda.venus.init +++ b/coda.venus.init @@ -23,20 +23,19 @@ else exit 0 fi +RETVAL=0 case "$1" in start) # Check if the service is already running? - if [ -f /var/lock/subsys/venus ]; then - msg_already_running venus - exit 1 - else + if [ ! -f /var/lock/subsys/venus ]; then msg_starting venus busy venus & - deltext - ok RETVAL=$? + ok [ RETVAL -eq 0 ] && touch /var/lock/subsys/venus + else + msg_already_running venus fi ;; stop) @@ -47,20 +46,19 @@ case "$1" in rm -f /var/lock/subsys/venus else msg_not_running venus - exit 1 fi ;; status) ;; - restart|reload) + restart|force-reload) $0 stop $0 start + exit $? ;; *) - msg_usage "$0 {start|stop|restart|reload|status}" - exit 1 + msg_usage "$0 {start|stop|restart|force-reload|status}" + exit 3 ;; esac exit $RETVAL -