From 9f389b3f84107d9d27a770aa9b2fc10da634a76f Mon Sep 17 00:00:00 2001 From: rread Date: Wed, 6 Nov 2002 07:49:02 +0000 Subject: [PATCH] * init script designed for MCR by Gord Eagle, and a useful example --- lustre/scripts/nodelustre | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 lustre/scripts/nodelustre diff --git a/lustre/scripts/nodelustre b/lustre/scripts/nodelustre new file mode 100755 index 0000000..b5e6540 --- /dev/null +++ b/lustre/scripts/nodelustre @@ -0,0 +1,46 @@ +#! /bin/sh +# nodelustre - Start and stop Lustre on MCR nodes +# Copyright (C) 2002 Cluster File Systems, Inc. +# Gord Eagle , 2002-09-10 + +# Set this to the shared config file. +MASTER_CONFIG=http://emcri/lustre.xml +CONFIG=/etc/lustre/lustre.xml +COMPUTE_NODE=client + +LCONF=/usr/local/cfs/lustre/utils/lconf +WGET=wget + +case "$1" in +start | stop) + # Fetch the config file. We can't use --output-document because it + # makes Wget ignore timestamping. + if test -n "$MASTER_CONFIG"; then + (cd `echo "$CONFIG" | sed 's%/[^/]*$%%'` && \ + $WGET --timestamping "$MASTER_CONFIG") || exit $? + fi + + # Map all client nodes to the COMPUTE_NODE virtual node. + if test -n "$COMPUTE_NODE" && nodeattr compute; then + node=" --node $COMPUTE_NODE" + else + node= + fi + + # If we're stopping, do the lconf cleanup. + if test "$1" = stop; then + cleanup=' --cleanup' + else + cleanup= + fi + + $LCONF$cleanup$node "$CONFIG" + ;; + +*) + echo "$0 {start|stop}" 1>&2 + exit 1 + ;; +esac + +exit 0 -- 1.8.3.1