#!/bin/bash # # lustre This shell script takes care of starting and stopping Lustre # # chkconfig: 345 99 1 # description: Lustre Lite network File System. \ # This starts both Lustre client and server functions. # processname: obdctl # config: /etc/lustre/lustre.cfg # pidfile: /var/run/lustre.pid SERVICE=lustre LOCK=/var/lock/subsys/$SERVICE # Source function library. if [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions fi # Source networking configuration. if [ -f /etc/sysconfig/network ] ; then . /etc/sysconfig/network fi # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 0 [ -f /usr/sbin/obdctl ] || exit 0 start() { echo -n $"Starting $SERVICE: " /usr/sbin/llrsetup.sh RETVAL=$? echo $SERVICE [ $RETVAL = 0 ] && touch $LOCK } stop() { echo -n $"Shutting down $SERVICE: " /usr/sbin/llcleanup.sh echo $SERVICE rm -f $LOCK } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; status) status $SERVICE ;; *) echo $"Usage: $SERVICE {start|stop|restart|status}" exit 1 esac exit $RETVAL