#!/bin/sh
# $OpenBSD: INSTALL,v 1.3 2000/07/14 01:35:08 matt Exp $
#
# Pre/post-installation setup of xntpd

# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=/etc/ntp.conf

# Function: tell the user what s/he needs to do to use the port just installed
#
do_notice()
{
    echo
    echo "+---------------"
    echo "| HTML documentation for $1 can be found in the directory"
    echo "| /usr/local/share/doc/ntp.  To use this application you must:"
    echo "|"
    echo "| 1) create/update the file ${CONFIG_FILE} (see the documentation)"
    echo "| 2) restart your system"
    echo "|"
    echo "| The system restart is necessary as tickadj is run from"
    echo "| /etc/rc.securelevel before the system securelevel is changed."
    echo "+---------------"
    echo
}

# verify proper execution
#
if [ $# -ne 2 ]; then
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
    exit 1
fi

# Verify/process the command
#
case $2 in
    PRE-INSTALL)
	: nothing to pre-install for this port
	;;
    POST-INSTALL)
	do_notice $1
	;;
    *)
	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
	exit 1
	;;
esac

exit 0
