#!/sbin/sh
#############################
# Product: DesktopConfig
# Fileset: LITECONFIG
# unconfigure
# @(#) $Revision: 1.3.98.1 $
#############################
#
# (c) Copyright Hewlett-Packard Company, 1993
#
################################################################################
#                            
# Setup general environment. 
#                           
################################################################################

UTILS="/usr/lbin/sw/control_utils"
if [[ ! -f $UTILS ]]
then
	print "ERROR:   Cannot find $UTILS"
	exit 1
fi
. $UTILS
exitval=$SUCCESS			# Anticipate success

#
# Verify the existence of the lite_config utility.
#
LITE_CONFIG="${SW_CONTROL_DIRECTORY}/lite_config"
if [[ ! -x ${LITE_CONFIG} ]]; then
	print "ERROR:   Internal error: cannot execute $LITE_CONFIG."
	print "         This is a fatal swinstall error and should be"
	print "         reported to the appropriate HP customer support"
	print "         representative."
	exit $FAILURE
fi


################################################################################
#			      
# Perform /etc/rc.config.d/<subsystem> "un-lite" modifications.
#
# Invoke lite_config in order to re-enable several optional subsystems.
# Subsystems are re-enabled by restoring the corresponding control 
# variables in the /etc/rc.config.d/<subsystem> files to their original
# "un-lite'ned" states.  
# Refer to the lite_config utility for details.
#			      
################################################################################

${LITE_CONFIG} -u -r 2>/dev/null
status=$?
[[ $status -ne 0 && $exitval -ne $FAILURE ]] && exitval=$status
exit $exitval
