Whamcloud - gitweb
Merge from b_devel -> b_orphan (up to ORPHAN_BASE5 tag on b_devel)
authoradilger <adilger>
Thu, 24 Apr 2003 08:28:50 +0000 (08:28 +0000)
committeradilger <adilger>
Thu, 24 Apr 2003 08:28:50 +0000 (08:28 +0000)
lustre/scripts/llite-group.sh [new file with mode: 0644]

diff --git a/lustre/scripts/llite-group.sh b/lustre/scripts/llite-group.sh
new file mode 100644 (file)
index 0000000..1cc0758
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# llite-group.sh : Cluster Manager service script for Lustre
+#
+# This must be named llite-<group>.sh, where group is the device 
+# group that is being managed by the cluster manager service.
+#
+
+set -e
+set -vx
+
+[ -f ${LUSTRE_CFG:=/etc/lustre/lustre.cfg} ] && . ${LUSTRE_CFG}
+
+LDAPURL=${LDAPURL:-ldap://localhost}
+CONFIG=${CONFIG:-test23}
+
+LACTIVE=${LACTIVE:-/usr/sbin/lactive}
+LCONF=${LCONF:-/usr/sbin/lconf}
+
+group=`basename $0 .sh| cut -d- -f2`
+confopt="--ldapurl $LDAPURL --config $CONFIG"
+
+[ -z "$group" ] && exit 0
+
+node=`hostname -s`
+
+[ -d ${STATUS_DIR:=/var/lustre} ] || mkdir -p $STATUS_DIR
+
+start() {
+        echo -n "Starting $SERVICE: "
+       python2 $LACTIVE $confopt --group $group --active $node
+        python2 $LCONF -v $confopt
+        RETVAL=$?
+       echo done
+}
+
+stop() {
+        echo -n "Shutting down $SERVICE: "
+        python2 $LCONF -dv $confopt
+        RETVAL=$?
+        echo done
+}
+
+status() {
+        RETVAL=0
+}
+
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       restart
+       ;;
+  status)
+       status $SERVICE
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|status}"
+       exit 1
+esac
+
+exit $RETVAL