#! /bin/sh
#**********************************************************************#
#*                                                                    *#
#* Copyright (c) 2001 by Sun Microsystems, Inc.                       *#
#* All rights reserved.                                               *#
#*                                                                    *#
#**********************************************************************#

#This script checks if the IPC ID exists. If it exists then it removes
#the IPC based on the type and the key of the IPC  


Output=`ipcs | grep 0x$1`

if [ $? -eq 0 ]
   then
   Ipc=`echo $Output | awk '{print $1}'`
   Key=`echo $Output | awk '{print $2}'`
   echo "KIX562I: Removing IPC $Ipc $Key"
   ipcrm -$Ipc $Key
fi
