#!/bin/sh
#
# $FreeBSD: ports/security/portaudit/pkg-install,v 1.4 2004/07/01 10:59:47 eik Exp $
#

PREFIX="${PREFIX:-%%PREFIX%%}"

case $2 in
PRE-INSTALL)
  if egrep -qs "^(FETCH|MASTER_SITE)_" "$PREFIX/etc/portaudit.conf" ;then
    echo
    echo "*** WARNING ***"
    echo
    echo "The preference file format has changed. Please edit"
    echo "  $PREFIX/etc/portaudit.conf"
    echo
  fi
  if egrep -qs "^daily_status_portaudit_" "/etc/periodic.conf" ;then
    echo
    echo "*** WARNING ***"
    echo
    echo "The periodic(8) names have changed. Please edit"
    echo "  /etc/periodic.conf"
    echo
  fi
  ;;
POST-INSTALL)
  if [ ! -f "%%DATABASEDIR%%/auditfile.tbz" ]; then
    echo
    echo "===>  To check your installed ports for known vulnerabilities now, do:"
    echo
    echo "      $PREFIX/sbin/portaudit -Fda"
    echo
  fi
  ;;
esac
