#!/bin/sh
set -u  # force better programming and ability to use check for not set
if [ "${1:-}" = "-x" ] ; then set -xv; shift; fi

node=`uname -n| sed -e 's/\([^\.]\)\..*/\1/'`
gang=`gang`
case $node in
  stken) robot="AML/J"
          ;;
   d0en) robot="AML/2"
          ;;
       *) robot=UNKNOWN
          ;;
esac

output=${1:-/dev/tty}
if [ `echo $output | grep -c /dev/` -eq 0 ] ; then 
  rm -f $output
fi

cat << EOF >>$output
<html> <head> <title>$robot Drive Status Page</title> </head>
<body>
<body bgcolor="#ffffff" text=#a0a0ff">
<meta http-equiv="Refresh" content="360">
<h1><center>$robot Drive Status Fetch Begin: `date`</center><h1>
<hr>
<pre>
EOF

dasadmin listd2 >>$output


######################################################################################Q

cat <<EOF >>$output
</pre>
<hr>
<h1><center>$robot Drive Status  Done : `date`</center><h1>
<hr>
</body>
EOF

