release=`uname -r`
platform=`uname -p`
version=`uname -v`
#
if [ ${platform} != ${expected_platform} ]; then
    echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n"
    echo "\tAborting installation.\n\n\n"
    exit 1
fi
if [ ${expected_release} != "osol" ]; then
  if [ ${expected_release} != "5.11" ]; then
    if [ ${release} != ${expected_release} ]; then
      echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
      echo "\tAborting installation.\n\n\n"
      exit 1
    fi
  else
    if [ ${version} != "11.0" ]; then
      echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
      echo "\tAborting installation.\n\n\n"
      exit 1
    fi
else
  if [ ${version} = "11.0" ]; then
    echo "\n\n\n\tThis package must be installed on an OpenSolaris machine\n"
    echo "\tAborting installation.\n\n\n"
    exit 1
  fi
fi

exit 0
