#!/bin/bash
# first  : initialize the sunhpc database
# second : add cluster data to database.
WHERE=$1
HERE=`pwd`
SUNHPC=/opt/sunhpc/bin/sunhpc

# initialize database
/opt/sunhpc/sbin/init-sunhpcDB

# add fronetend node to database
MYNAME=`hostname -s`
$SUNHPC add host $MYNAME rack=0 rank=1 member=server 2> /tmp/sunhpc-initdb.log
$SUNHPC add catindex $MYNAME category=host 2>> /tmp/sunhpc-initdb.log
