pkgsrc/mail/yatsvrs/DEINSTALL
taca 1f09a256bd - Utilize bsd.pkg.install.mk framework.
- Add fallback sendmail path, should fix some buld build problem.
- Add -x option which enable XTND command support to yatd(8).

Bump PKGREVISION.
2004-12-15 13:18:02 +00:00

24 lines
608 B
Bash

#!/bin/sh
# $Id: DEINSTALL,v 1.3 2004/12/15 13:18:02 taca Exp $
YAT_CONF_DIR="@PKG_SYSCONFDIR@"
DEFAULT_ADMIN="@DEFAULT_ADMIN@"
MIN="@YATSVR_MINGID@"
MAX="@YATSVR_MAXGID@"
case "$2" in
DEINSTALL)
admin=`${CAT} ${YAT_CONF_DIR}/.admin`
if [ "$admin" = "${DEFAULT_ADMIN}" ]; then
${RM} -f ${YAT_CONF_DIR}/.admin
fi
${AWK} -F: '$1 !~ /^no/ { if ($3 < '$MIN' || $3 > '$MAX') print $1}' \
/etc/group > /tmp/hidden-group
if ${CMP} -s ${YAT_CONF_DIR}/.hidden-group /tmp/hidden-group; then
${RM} -f ${YAT_CONF_DIR}/.hidden-group
fi
${RM} -f /tmp/hidden-group
${RM} -f ${YAT_CONF_DIR}/*\~old
;;
esac