#!/bin/sh
#
# Copy aside the kernel/drv/ses.conf file if
# it appears to have been modified so that
# any customizations will not be lost.
#

Date=`date +%m%d%y%M`

vers=`pkgparam -R $ROOTDIR SUNWses VERSION 2>/dev/null`
if test $vers
then
    if [ $vers = "1.2,REV=1997.07.15.21.46" ]
    then
        if test -f $ROOTDIR/kernel/drv/ses.conf
	then
            SUM=`sum $ROOTDIR/kernel/drv/ses.conf | awk ' { print $1 }'`
            if [ $SUM != "38413" ]; then
		echo
        	echo "       The file kernel/drv/ses.conf will be overwritten by this patch"
        	echo "\n"
        	echo "       A copy of the original kernel/drv/ses.conf file will be saved "
        	echo "       under the filename"
        	echo "\n"
        	echo "            /kernel/drv/ses.conf.$Date"
        	echo "\n"
		echo "       The files need to be manually merged if any customizations"
        	echo "       were done."
        	echo
                cp -p $ROOTDIR/kernel/drv/ses.conf $ROOTDIR/kernel/drv/ses.conf.$Date
            fi
        fi
    fi
fi

exit 0
