#!/bin/sh
#
#pragma ident	"@(#)preinstall	1.2	08/06/03 SMI"
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
EXIT=0

rm -f $BASEDIR/var/volfs.tmp > /dev/null 2>&1

# If SUNWvolr was installed, then only enable volfs if vold would have run
# (the user has not removed S81volmgt).
# Otherwise this is an initial install of SUNWvolr, and volfs should be
# enabled by default.
# If this is an upgrade and volfs service was already present we should
# not change the state (the user may have disabled volfs service)

if [ "$UPDATE" = yes ]; then
	if [ -f $BASEDIR/etc/rc3.d/S81volmgt -o -f $BASEDIR/etc/rc2.d/S92volmgt ]; then
		touch $BASEDIR/var/volfs.tmp
	fi
else
	touch $BASEDIR/var/volfs.tmp
fi

exit $EXIT
