#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# checkinstall script for SUNWdtlog
#
#pragma ident	"@(#)checkinstall.SUNWdtlog	1.1	06/05/19 SMI"
#

# It's unnecessary for initial install.
if [ "$UPDATE" != yes ]; then
	# On initial install, do nothing.
	exit 0
fi

# a) If old init.d control are used then always enable CDE login
# it has the highest priority.
# b) If enable cde-login, then leave them untouched.
# c) Else it's upgrade from S8/S9 FCS.

CDE_SUNWDTLOG=""
if [ -f ${PKG_INSTALL_ROOT}/etc/rc2.d/S99dtlogin ] ; then
	CDE_SUNWDTLOG="legacy_enable"
elif [ -f ${PKG_INSTALL_ROOT}/var/svc/manifest/application/graphical-login/cde-login.xml ]; then
	CDE_SUNWDTLOG="new"
else
	CDE_SUNWDTLOG="legacy_disable"
fi

echo CDE_SUNWDTLOG=\"${CDE_SUNWDTLOG}\" > $1
exit 0
