# Copyright "%c%"
#
#ident "%W%"
#ident "$Header: $"
#
#!/bin/sh
prog=`basename $0`

LOGFILE=/var/sadm/install/logs/${PKG}.log

[ -f /tmp/openslp.dbg ] && {
	debug="true"
}

[ -n "$debug" ] && echo  "entering $prog" >>$LOGFILE

# There are only 2 variables that are expected in the response
# file for OpenSLP:
# 
# 	CLASSES				"none" and "openslp" are the only
# 					classes.
# 
# 	SLP_UPDATE_INSTALL		non-zero if package not installed, 0
#					otherwise.
# 					

RESPFILE=$1
> $RESPFILE

# CLASSES is expected in the response file
[ -n "$debug" ] && echo  "$prog: CLASSES=$CLASSES" >> $LOGFILE
echo CLASSES=\"$CLASSES\" >> $RESPFILE


# if this package is already installed, we'll want to preserve previous
# configuration files. Look at the preinstall script for the code that
# uses SLP_UPDATE_INSTALL.
pkginfo -q ${PKGINST}
SLP_UPDATE_INSTALL=$?
[ -n "$debug" ] && \
	echo "$prog: SLP_UPDATE_INSTALL=$SLP_UPDATE_INSTALL" >> $LOGFILE
echo SLP_UPDATE_INSTALL=\"$SLP_UPDATE_INSTALL\" >> $RESPFILE

[ -n "$debug" ] && echo  "leaving $prog" >> $LOGFILE

exit 0
