#!/bin/bash
source wowlib2
if [ -n "$SAP_INSTANCE_DEF" ]; then
  echo "$SAP_INSTANCE_DEF" | while read sap_type sap_inst sap_prof sap_parm; do
    if [ "$sap_type" == "${sap_type#\#}" ]; then
	  #echo "sap_type $sap_type"
	  #echo "sap_inst $sap_inst"
	  #echo "sap_prof $sap_prof"
	  #echo "sap_parm $sap_parm"
	  #echo
	  woweng2 UUID=rsc_sapinst_${sap_inst}  \
		SAP_INSTANCE=$sap_inst \
		SAP_START_PROFILE=$sap_prof \
		$sap_parm \
		$wowcli/01-sapinst_${sap_type}.cli </dev/null
    fi
  done
fi
