#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)preinstall.tmpl	1.1	04/10/21 SMI"
#

if [ "$UPDATE" = "yes" ]; then 

        #
        # If we are upgrading a system with smf(5) already present, then
        # we won't take any action.  Otherwise, if the boot services would
	# have been enabled before, preserve that state.
        #
        BASEPREFIX=`echo $BASEDIR | sed "s/\//_/g"`

        FILENAME=`echo sunwbsr_boot"$BASEPREFIX" | cut -c 1-256`
        TMPFILE=/tmp/$FILENAME
        if [ -f $TMPFILE ]; then
                rm $TMPFILE
        fi

        if [ ! -f $BASEDIR/var/svc/manifest/network/rarp.xml ]; then
                if [ -d $BASEDIR/tftpboot ] || [ -d $BASEDIR/rplboot ]
		then
                        touch $TMPFILE
                fi
        fi
fi
