#!/bin/ksh
#
# Pragma ident   @(#)tests9.tst    1.3    04/09/14    SMI
# 
# Copyright 2004 Sun Microsystems, Inc.All rights reserved.
# Use is subject to license terms.
#
#
#
# Original Author: Terry Hu
#

# variables
hctsdir=SUNWhcts			# base directory
hname=$1			# test system
testcmd=tests/str/largedisk.stf	# harddrive test
dls=				# data list
prgdir=prgs			# program directory
dfoutp=				# df output
fsys=				# file system
mpt=				# mount point

# functions

# do function
go_fun()
{
	$prgdir/funcs "$*" 2>&1
}	

### MAIN ###

# change to base directory
cd `dirname $0`
while [ `basename $PWD` != $hctsdir ]
do
	cd ..
done

dls=`/opt/SUNWstaf/prgs/sliceinfo | sed 's/\// /g' | awk '{print $3}' | sed 's/..$/p0/' | sort | uniq`

# list harddrive info
if [ -z "$dls" ] 
then
	echo "No Harddrives found."
	exit 1
else
    echo "h:<HR><B><U>Storage tests - Large disk</U></B>:"
    echo "h:Available USB Hard drives = "							
    for inline in $dls
    do
		echo "h:$inline"
    done
    echo "X:4:$testcmd"
    echo "T:Enter target USB hard drive to run large disk test:$inline"    
    echo "x:5:"
    echo "T:Enter size of target USB hard drive to run large disk test:"    
    echo "x:6:"

    go_fun runt 0 1 10 1
fi

