1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/security/op/pkg-install
Mario Sergio Fujikawa Ferreira 797e87df2e - Update maintainer email
- Replace some harcoded paths with tweakable variables
- Some naming conventions changes around Makefile
- Some additional patching
- Add some hackery to bypass fetch problems with
  coast sites
- Add $FreeBSD$ to PKGINSTALL and PLIST
- Deploy PORTDOCS technology inside PLIST

Discussed and worked with:	maintainer
2001-04-10 10:52:20 +00:00

55 lines
846 B
Bash

#!/bin/sh
# $FreeBSD$
[ $# != 2 ] && exit 1
PKGNAME=$1
ACTION=$2
CONF_DIR=${PKG_PREFIX}/etc
SAMP_DIR=${CONF_DIR}
CONF_FILE=op.access
CONF_OWN=root
CONF_GRP=wheel
CONF_MODE=400
SAMP_FILE=${CONF_FILE}
SAMP_SUFX=.sample
INSTALL=install
CMP=cmp
RM=rm
case $ACTION in
POST-INSTALL)
if [ -f ${CONF_DIR}/${CONF_FILE} ]; then
echo "$PKGNAME: Will not overwrite existing ${CONF_DIR}/${CONF_FILE} file."
else
${INSTALL} -c -o ${CONF_OWN} -g ${CONF_GRP} -m ${CONF_MODE} \
${SAMP_DIR}/${SAMP_FILE}${SAMP_SUFX} \
${CONF_DIR}/${CONF_FILE}
fi
;;
DEINSTALL)
if ${CMP} -s ${SAMP_DIR}/${SAMP_FILE}${SAMP_SUFX} \
${CONF_DIR}/${CONF_FILE}; then
${RM} -f ${CONF_DIR}/${CONF_FILE}
else
echo "$PKGNAME: Will not remove existing ${CONF_DIR}/${CONF_FILE} file."
fi
;;
PRE-INSTALL|POST-DEINSTALL)
exit 0
;;
*)
exit 1
;;
esac
exit