#!/bin/sh
#
# $Revision$
# NetBackup Sun postbackout 

## Automatically update the Server's client OS binaries
OS_LEVEL=`uname -r | /bin/cut -d"." -f2` # Get the Marketing version
if [ -r $PKG_INSTALL_ROOT/usr/openv/netbackup/client/Solaris/Solaris$OS_LEVEL ] ;then
	cd $PKG_INSTALL_ROOT/usr/openv/netbackup/client/Solaris/Solaris$OS_LEVEL
	./cp_to_client -CopyOnly
else
	/bin/echo "Solaris OS level $OS_LEVEL, not supported"
	/bin/echo "cp_to_client attempt failed, retry manually"
fi


############################################################

#  Used to replace NetBackup Java file NB-Java.tar.Z

Latest=$PKG_INSTALL_ROOT/usr/openv/NB-Java.tar.pre51_3AS0949_M.Z
if [ -r $Latest ] ; then
	/bin/cp -p $Latest $PKG_INSTALL_ROOT/usr/openv/NB-Java.tar.Z
	rm $Latest
	echo " Rolling back $PKG_INSTALL_ROOT/usr/openv/NB-Java.tar.Z"
	echo " In order to re-update this/any NetBackup Java Clients, run:"
	echo "  $PKG_INSTALL_ROOT/usr/openv/netbackup/bin/update_clients -Install_Java"
fi
exit 0
