openbsd-ports/net/poptop/pkg/INSTALL
sturm 73a6ddf8af update to 1.1.4-b4
- fixes two buffer overflows in pptpctrl
- README with installation instructions added

from Craig Barraclough <craigba@creative.com.au>
2003-06-05 07:53:20 +00:00

70 lines
1.5 KiB
Plaintext

#!/bin/sh
# $OpenBSD: INSTALL,v 1.2 2003/06/05 07:53:20 sturm Exp $
# 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=${SYSCONFDIR}/pptpd.conf
SAMPLE_CONFIG_FILE=$PREFIX/share/examples/poptop/pptpd.conf-sample
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration file, $CONFIG_FILE,"
echo "| has NOT been changed. You may want to compare it to the"
echo "| current sample file, $SAMPLE_CONFIG_FILE,"
echo "| and update your configuration as needed."
}
do_install()
{
install -o root -g wheel -m 644 $SAMPLE_CONFIG_FILE $CONFIG_FILE
echo
echo "+---------------"
echo "| The $1 configuration file, $CONFIG_FILE,"
echo "| has been installed. Please view this file and change"
echo "| the configuration to meet your needs."
}
do_notice2()
{
echo "| "
echo "| Please read ${PREFIX}/share/doc/poptop/README.OpenBSD for"
echo "| important installation notes before running PoPToP."
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)
if [ -f $CONFIG_FILE ]; then
do_notice $1
else
do_install $1
fi
do_notice2
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0