#!/bin/sh
#
# Copyright (c) 1995, 1998, 2000 by Sun Microsystems, Inc.
# All rights reserved.
#
#pragma ident	"@(#)i.svmpreserve	1.1	00/07/07 SMI"
#
PATH=/usr/sadm/bin:$PATH

#
# If we have saved away files in $PKGSAV, then we had SUNWmd. Copy the 
# config files. If there were files in dest, keep them else copy new ones.
#

while read src dest; do
	BASENAME=`basename $dest`
	if [ -f ${PKGSAV}/${BASENAME} ]; then
		cp ${PKGSAV}/${BASENAME} $dest
		rm ${PKGSAV}/${BASENAME}
	else 
		if [ ! -f $dest ]; then
			cp $src $dest
		fi
	fi
done

exit 0
