Whamcloud - gitweb
Remove intersync stuff from /etc/init.d/lustre.
[fs/lustre-release.git] / lustre / scripts / lustre
1 #!/bin/bash
2 #
3 # lustre   This shell script takes care of starting and stopping Lustre
4 #
5 # chkconfig: 345 99 1
6 # description: Lustre Lite network File System.                              \
7 #              This starts both Lustre client and server functions.
8 # processname: obdctl
9 # config: /etc/lustre/lustre.cfg
10 # pidfile: /var/run/lustre.pid
11
12 SERVICE=lustre
13 LOCK=/var/lock/subsys/$SERVICE
14
15 # Source function library.
16 if [ -f /etc/init.d/functions ] ; then
17    . /etc/init.d/functions
18 fi
19
20 # Source networking configuration.
21 if [ -f /etc/sysconfig/network ] ; then
22    . /etc/sysconfig/network
23 fi
24
25 # Check that networking is up.
26 [ "${NETWORKING}" = "no" ] && exit 0
27
28 [ -f /usr/sbin/obdctl ] || exit 0
29
30 start() {
31         echo -n $"Starting $SERVICE: "
32         /usr/sbin/llrsetup.sh
33         echo $SERVICE
34         RETVAL=$?
35         [ $RETVAL = 0 ] && touch $LOCK
36 }
37
38 stop() {
39         echo -n $"Shutting down $SERVICE: "
40         /usr/sbin/llcleanup.sh
41         echo $SERVICE              
42         rm -f $LOCK
43 }
44
45 restart() {
46         stop
47         start
48 }
49
50 # See how we were called.
51 case "$1" in
52   start)
53         start
54         ;;
55   stop)
56         stop
57         ;;
58   restart)
59         restart
60         ;;
61   status)
62         status $SERVICE
63         ;;
64   *)
65         echo $"Usage: $SERVICE {start|stop|restart|status}"
66         exit 1
67 esac
68
69 exit $RETVAL
70