#!/bin/sh
#
# Sun WebServer daemon preinstall
#
INSTALL_ROOT=$BASEDIR
#

# Is there a web server daemon installed?

if [ -f ${INSTALL_ROOT}/usr/lib/httpd ]; then

	# We need to make sure it's not SWS 1.0 
	# (which also puts httpd in /usr/lib, although it's different.)

   	pkginfo SUNWhttpu >/dev/null 2>&1
    	if [ $? -eq 0 ]; then 
	    echo "Sun WebServer 1.0 is installed on this machine."
	    echo
	    echo "Remove the packages SUNWhttpu, SUNWhttpr, and SUNWhttpv,"
	    echo "or install Sun WebServer 2.0 into a different root directory."
	    exit 3
    	fi;

fi

