62 lines
1.1 KiB
Text
62 lines
1.1 KiB
Text
#!/bin/sh
|
|
#
|
|
# $NetBSD: INSTALL,v 1.1 2001/10/31 22:59:45 zuntum Exp $
|
|
|
|
PKGNAME=$1
|
|
STAGE=$2
|
|
|
|
CAT="@CAT@"
|
|
CHMOD="@CHMOD@"
|
|
CP="@CP@"
|
|
MKDIR="@MKDIR@"
|
|
|
|
CONFDIR="@VTUN_SYSCONFDIR@"
|
|
SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vtun
|
|
CONFFILES="vtund.conf"
|
|
LOCKDIR=/var/lock/vtund
|
|
LOGDIR=/var/log/vtund
|
|
|
|
case ${STAGE} in
|
|
PRE-INSTALL)
|
|
;;
|
|
|
|
POST-INSTALL)
|
|
${MKDIR} ${LOCKDIR}
|
|
${MKDIR} ${LOGDIR}
|
|
|
|
echo "Installing configuration files:"
|
|
for file in ${CONFFILES}
|
|
do
|
|
FILE=${CONFDIR}/${file}
|
|
SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
|
|
if [ -f ${FILE} ]
|
|
then
|
|
echo " ${FILE} already exists"
|
|
else
|
|
echo " ${FILE}"
|
|
${CP} ${SAMPLEFILE} ${FILE}
|
|
${CHMOD} 644 ${FILE}
|
|
fi
|
|
done
|
|
${CAT} << EOF
|
|
|
|
===========================================================================
|
|
Some files you might need to customize include the following:
|
|
|
|
EOF
|
|
for file in ${CONFFILES}
|
|
do
|
|
FILE=${CONFDIR}/${file}
|
|
echo " ${FILE}"
|
|
done
|
|
${CAT} << EOF
|
|
===========================================================================
|
|
EOF
|
|
;;
|
|
|
|
*)
|
|
echo "Unexpected argument: ${STAGE}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
exit 0
|