From 902c1a230ee1a0f946f147c3ab930c58b8c2d845 Mon Sep 17 00:00:00 2001 From: fanyong Date: Fri, 9 Jan 2009 01:32:26 +0000 Subject: [PATCH] Branch HEAD b=18124 i=eric.mei i=grev Define "sec_cleanup" before use it. --- lustre/tests/sanity-sec.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 79f2d1e..c798c8e 100644 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -42,6 +42,12 @@ USER1=`cat /etc/passwd|grep :$ID1:$ID1:|cut -d: -f1` check_and_setup_lustre +sec_cleanup() { + if [ "$I_MOUNTED" = "yes" ]; then + cleanupall -f || error "sec_cleanup" + fi +} + DIR=${DIR:-$MOUNT} [ -z "`echo $DIR | grep $MOUNT`" ] && \ error "$DIR not in $MOUNT" && sec_cleanup && exit 1 @@ -565,11 +571,6 @@ sec_unsetup() { } sec_unsetup -sec_cleanup() { - if [ "$I_MOUNTED" = "yes" ]; then - cleanupall -f || error "sec_cleanup" - fi -} sec_cleanup echo '=========================== finished ===============================' -- 1.8.3.1