#!/bin/sh
#
#       %W% %E%
#

host=`uname -n`
curf=curf_$1
mach=`uname -m`

if [ $mach = i586 -o $mach = i686 ]
then
  gig_pid=`ps -ef | grep gig_sa | grep $2 | awk '{print $1}'`
else
  gig_pid=`ps -ef | grep gig_sa | grep $2 | awk '{print $2}'`
fi

rendir=${GIG_D_ROOT}/projects/renmanadm/${curf}
# echo >> ${rendir}/gigrs_logfile
# echo $0 $2 gig_pid $gig_pid 2 >> ${rendir}/gigrs_logfile

if [ $gig_pid ]
then
  echo $gig_pid  > ${rendir}/${host}$2
else
  echo 0 > ${rendir}/${host}$2
fi
