HP-UX vPars and Integrity VM V6.3 Administrator Guide

# setup BUS,DEV,TGT for next call
TGT=$TGT+1
if [ $TGT -gt $WRKTGT ]
then
TGT=0
DEV=$DEV+1
fi
# Skip b,d of 0,3
if [ $BUS -eq 0 ] && [ $DEV -eq $DEVSKIP ]
then
DEV=$DEV+1
fi
if [ $DEV -gt $DEVMAX ]
then
DEV=0
BUS=$BUS+1
fi
if [ $BUS -gt $BUSMAX ]
then
# NOTE: should not be here, but error out just in case.
echo "ERROR: Max supported bus value exceeded, no more room for another adaptor."
exit 1
fi
} # end autobdt()
#
# function usage() - prints help text
#
function usage {
echo "usage: $THISSCRIPT [[-a] [-F flags] -f disklistfile [-N #] [-n #] -P guestname [-q] [-T]] | [-H|-h]"
echo " -a Add the disks (default is to only display what will be added)"
echo " -F \"arg(s)\" Additional hpvmmodify options or flags (double quotes required)"
echo " -f disklistfile File containing list of disks to add"
echo " -h Print usage (help)"
echo " -H Print usage (Help)"
echo " -N # Number of devices to add from the disklistfile"
echo " -n # Number of devices to add at one time (default: $XNDEFAULT)"
echo " -P guestname Name of Integrity VM (guest) to modify"
echo " -q Quite mode - no display of hpvmmodify command that will run"
echo " -t targetmax Max target value to use for -a disk:avio_stor:[b,d,targetmax]..."
echo " Valid values:"
echo " 0 - special case: script will use full 0-127 range"
echo " 15...127 - script will use specified max"
echo " 1... 14 - not valid for this script, since 0-14 is"
echo " the normal default range for target values"
echo " if -t is not specified."
echo " -T Time the hpvmmodify add command with 'timex'"
} # end usage()
#
# main() 'function'
#
# Command option verification variables
typeset -i a
typeset -i F
typeset -i f
typeset -i N
typeset -i n
typeset -i P
typeset -i q
typeset -i s
typeset -i T
typeset -i t
a=0
F=0
f=0
N=0
n=0
P=0
q=0
s=0
T=0
t=0
# Variables for cmd-line arguments
DISKLISTFILE=""
GUESTNAME=""
TIMECMD=""
FLAGS=""
typeset -i ADDFLAG
typeset -i AUTOBDT
typeset -i QUIET
typeset -i USERTGT
typeset -i USERDISKLIMIT
283