#!/bin/ksh93
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# 61haes_r720 src/43haes/usr/sbin/cluster/events/utils/cl_scsipr_reg_res.sh 1.1 
#  
# Licensed Materials - Property of IBM 
#  
# Restricted Materials of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2015 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 

##################################################################
# Name: cl_scsipr_reg_res
#
# Called by: reconfig_resource_release
#
# Description: This script register and reserve the hdisk if pvid
#              or uuid of the hdisk is passed to it as arguement.
#
# Input: PVID or UUID of the hdisk
#
# Output: None
##################################################################

# Including file containing SCSIPR functions
. /usr/es/sbin/cluster/events/utils/cl_scsipr_event_functions

typeset disk_id=$1

typeset hdisk=$(lspv -u | grep -w $disk_id | awk '{print $1}')
if [[ -n $hdisk ]];then
    cl_scsipr_Reg_Res $hdisk
fi

