# Check if the core package has been installed
COREPKG=`echo ${PKGINST} | sed 's/desktop-.*/core01/'`

pkginfo ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} -q ${COREPKG}
if [ $? -ne 0 ]; then
  echo "The ${COREPKG} package could not be found. Please install the"
  echo "${COREPKG} package and try this installation again"
  exit 3    # Suspend
fi

OFFICE_PATH=`pkginfo ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} -r ${COREPKG}`

# Check if GNOME release is < 2.6
pkginfo ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} -q SUNWgnome-panel
if [ $? -eq 0 ]; then
  pkginfo ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} -x SUNWgnome-panel | grep ' 2\.0\..,REV' 2>&1 > /dev/null
  if [ "$?" = 0 ]; then 
    LEGACY_GNOME="true"
  else
    LEGACY_GNOME="false"
  fi
fi

cat >$1 <<!
OFFICE_PATH=${OFFICE_PATH}
LEGACY_GNOME=${LEGACY_GNOME}
!

exit 0
