#!/bin/sh
#
# 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1987
# LICENSED MATERIALS - PROPERTY OF IBM
# REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
#
# $Header:apply.update.3 12.0$
# $ACIS:apply.update.3 12.0$
# $Source: /ibm/acis/usr/sys/support/lib/RCS/apply.update.3,v $

#Apply.update step 3; bring in the update itself

: ${File?} ${Buffer?} ${LIB?}

cd /

if [ -r Update.2 ]
then
	sh Update.2
	rc=$?
	case $rc in
	0)	;;
	*)	exit $rc
		;;
	esac
fi

echo -n "
This step will update your system with the System Update.
If step 1 indicated that modified files will be overwritten
by the Update, and you have not saved those files, you
should not continue with this step until you have saved
those files.

If you wish to stop now, type <Ctrl>-C, and restart later
from this point with the command
	apply.update -3 $args

If you wish to continue, make sure the System Update media
is properly loaded (a tape in the streaming tape drive, a
diskette in the diskette drive), and press Enter.

Press Enter to continue, <Ctrl>-C to abort:"

read junk

echo -n "Updating system ..."
eval $Buffer tar xfp $File
echo " done"

if [ -r Update.3 ]
then
	sh Update.3
	rc=$?
	case $rc in
	0)	;;
	*)	exit $rc
		;;
	esac
fi

rm -rf Update.1 Update.2 Update.3 Update.list
rm -f /sys/support/ptfdir/ptf[0-9]*
rm -f /usr/spool/uucppublic/ptf*
exit 0
