Whamcloud - gitweb
Make the cleanup and remount scripts consistent in accepting "NAME" as
authoradilger <adilger>
Wed, 23 Oct 2002 22:06:01 +0000 (22:06 +0000)
committeradilger <adilger>
Wed, 23 Oct 2002 22:06:01 +0000 (22:06 +0000)
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
lustre/tests/llmountcleanup.sh
lustre/tests/llrmount.sh

index f1d15a1..4cb6029 100755 (executable)
@@ -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
 
index 8d6ff91..4e4a855 100755 (executable)
@@ -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
 
index 51a559e..f33b3eb 100755 (executable)
@@ -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