]> git.pld-linux.org Git - packages/coda.git/blame_incremental - coda.update.init
- LSB conformance changes
[packages/coda.git] / coda.update.init
... / ...
CommitLineData
1#!/bin/sh
2#
3# update
4#
5# chkconfig: 345 95 02
6#
7# description: The Coda update server and clients
8#
9
10# Source function library
11. /etc/rc.d/init.d/functions
12
13# Get network config
14. /etc/sysconfig/network
15
16# Check that networking is up
17if is_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network ]; then
19 msg_network_down update
20 exit 1
21 fi
22else
23 exit 0
24fi
25
26RETVAL=0
27case "$1" in
28 start)
29 # Check if the service is already running?
30 if [ ! -f /var/lock/subsys/update ]; then
31 msg_starting rpc2portmap
32 daemon rpc2portmap
33 RETVAL=$?
34 msg_starting updatesrv
35 daemon updatesrv
36 [ RETVAL -eq 0 ] && RETVAL=$?
37 msg_starting updateclnt
38 daemon updateclnt -h `cat /var/lib/vice/db/scm`
39 [ RETVAL -eq 0 ] && RETVAL=$?
40 [ RETVAL -eq 0 ] && touch /var/lock/subsys/update
41 else
42 msg_already_running update
43 fi
44 ;;
45 stop)
46 if [ -f /var/lock/subsys/update ]; then
47 msg_stopping updateclnt
48 killproc updateclnt
49 msg_stopping updatesrv
50 killproc updatesrv
51 msg_stopping rpc2portmap
52 killproc rpc2portmap
53 rm -f /var/lock/subsys/update
54 else
55 msg_not_running update
56 fi
57 ;;
58 status)
59 ;;
60 restart|force-reload)
61 $0 stop
62 $0 start
63 exit $?
64 ;;
65 *)
66 msg_usage "$0 {start|stop|restart|force-reload|status}"
67 exit 3
68 ;;
69esac
70
71exit $RETVAL
This page took 0.073129 seconds and 4 git commands to generate.