##/bin/sh
#-----------------------------------------------------------------------
-# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# we need common.config
-if ! . ./common.config
+if [ "$iam" != "check" ]
then
- echo "$iam: failed to source common.config"
- exit 1
+ if ! . ./common.config
+ then
+ echo "$iam: failed to source common.config"
+ exit 1
+ fi
fi
# make sure we have a standard umask
type=$1
SCRATCH_OPTIONS=""
- if [ $FSTYP != "xfs" ]; then
+ if [ "$FSTYP" != "xfs" ]; then
return
fi
type=$1
TEST_OPTIONS=""
- if [ $FSTYP != "xfs" ]; then
+ if [ "$FSTYP" != "xfs" ]; then
return
fi
_notrun "External device testing in progress, skipped this test"
}
+# check for the fsgqa user on the machine
+#
+_require_user()
+{
+ qa_user=fsgqa
+ cat /etc/passwd | grep -q $qa_user
+ [ "$?" == "0" ] || _notrun "$qa_user user not defined."
+}
+
# check that a FS is mounted as XFS. if so, return mount point
#
_xfs_mounted()
device=$1
- if _mount | grep $device | $AWK_PROG '
+ if _mount | grep "$device " | $AWK_PROG '
/type xfs/ { print $3 ; exit 0 }
END { exit 1 }
'
exit 1
fi
+ extra_mount_options=""
device=$1
if [ "$2" != "none" ]; then
extra_log_options="-l$2"
_check_test_fs()
{
+ if [ "$FSTYP" != "xfs" ]; then
+ return
+ fi
+
TEST_LOG="none"
TEST_RT="none"
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
fi
fi
- if [ "`_fs_type $TEST_DEV`" != "xfs" ]
+ if [ "`_fs_type $TEST_DEV`" != "$FSTYP" ]
then
- echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED XFS filesystem"
+ echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED $FSTYP filesystem"
$DF_PROG $TEST_DEV
exit 1
fi