#!/bin/bash
#==============================================================
# luCamaIocStandardPorts
#
# ARGUMENTS:
#
# OPTION:     
#
# Facility:  SLAC/LCLS
#
# For a Linac Upgrade CAMAC IOC, change the startup file to use the
# standard production EPICS CA ports and then reboot the ioc 
# (perform hard reset as soft reset PV will not work when on alt ports).
#
# Usage: luCamacIocStandardPorts <location>
#
# Arguments: 
#            location: soft ioc location name, for example li28
# 
#----------------------------------------------------------------------------
# Mod:
#        
#==============================================================

loca=`echo $1 | tr '[:upper:]' '[:lower:]'`

LOCA=`echo $1 | tr '[:lower:]' '[:upper:]'`

echo  Rebooting ${LOCA} CAMAC IOC with standard Channel Access configuration...

cp $EPICS_IOCS/ioc-${loca}-cv01/standardports_startup.cmd $EPICS_IOCS/ioc-${loca}-cv01/startup.cmd

caput CRAT:${LOCA}:CV01:HARDRESET 1  

exit 0

