#!/bin/ksh

# 
# @HP_COPYRIGHT@
#
# HISTORY
# $NOHISTORY:$
# $EndNOHISTORY$
# 
# @(#)$RCSfile: sc_post_upgrade,v $ $Revision: 1.8 $ (HP) $Date: 2003/11/14 15:59:41 $
# 

echo "Retrieving the backup file path..."

backup_path=`ls -rt /var/rms/backup/* | tail -1`

echo $backup_path

echo "Restoring the database from the backup file..."

rmstbladm -r $backup_path

echo "Configuring consolidated logging..."

/usr/opt/srasysman/bin/scca_setup -configure rmshost

echo "Setting RMS attributes..."

rcontrol create attribute=cleanup-timeout val=900
rcontrol create attribute=ignore-cleanup-failure val=1
