From 3552179ba25a505e9e9f98b865223168d89da1ff Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 23 Oct 2002 22:06:01 +0000 Subject: [PATCH] Make the cleanup and remount scripts consistent in accepting "NAME" as the basename of the config script, so you can do: NAME=lov sh llmount.sh NAME=lov sh llmountcleanup.sh and it will work. Also fix a bug in llmount.sh, which I think would have prevented the XML config file from being regenerated properly. --- lustre/tests/llmount.sh | 2 +- lustre/tests/llmountcleanup.sh | 10 +++++++--- lustre/tests/llrmount.sh | 12 ++++++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lustre/tests/llmount.sh b/lustre/tests/llmount.sh index f1d15a1..4cb6029 100755 --- a/lustre/tests/llmount.sh +++ b/lustre/tests/llmount.sh @@ -7,7 +7,7 @@ NAME=${NAME:-local} config=$NAME.xml mkconfig=./$NAME.sh -if [ ! -f $local.xml -o $mkconfig -nt $local.xml ]; then +if [ ! -f $config -o $mkconfig -nt $config ]; then $mkconfig $config || exit 1 fi diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 8d6ff91..4e4a855 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,10 +1,14 @@ #!/bin/sh LCONF=${LCONF:-../utils/lconf} +NAME=${NAME:-local} -if [ ! -f local.xml ]; then - ./local.sh +config=$NAME.xml +mkconfig=./$NAME.sh + +if [ ! -f $config -o $mkconfig -nt $config ]; then + $mkconfig $config || exit 1 fi -${LCONF} --cleanup --dump /tmp/debug local.xml +${LCONF} --cleanup --dump /tmp/debug $config diff --git a/lustre/tests/llrmount.sh b/lustre/tests/llrmount.sh index 51a559e..f33b3eb 100755 --- a/lustre/tests/llrmount.sh +++ b/lustre/tests/llrmount.sh @@ -1,9 +1,13 @@ #!/bin/sh -LCONF=../utils/lconf +LCONF=${LCONF:-../utils/lconf} +NAME=${NAME:-local} -if [ ! -f local.xml ]; then - ./local.sh +config=$NAME.xml +mkconfig=./$NAME.sh + +if [ ! -f $config -o $mkconfig -nt $config ]; then + $mkconfig $config || exit 1 fi -${LCONF} --gdb local.xml +${LCONF} --gdb $config || exit 2 -- 1.8.3.1