20045859ba
the changelog: - code: remove incorrect usage of vfork() - code: detect and prefer utmpx where available - code: removed idedit, install-big. var-qmail packages are no more - portability problem: explicitly initialize strerr_sys and define BIND_8_COMPAT to work around Mac OS X - code: add instchown to set ownership and mode on installed files - code: add instpackage to install without root access - doc: rename INSTALL, SENDMAIL to INSTALL.md, SENDMAIL.md to support building on case-insensitive filesystems - code: lookup uid/gid at runtime - code: use DESTDIR environment variable as root directory in install pkgsrc changes: - If hostname isn't FQDN, config-fast-pkgsrc wouldn't produce a working config, so don't run it; tell user what to do instead - Stage QMAIL_QUEUE_DIR into DESTDIR/tmp, to be more obvious that it's not being packaged up (and is not how a queue gets created at pkg_add time) - Drop custom destdir, qbiffutmpx, and Darwin patches - Rebase TLS-onlyremote, QMAILREMOTE, and SRS patches - Require latest ucspi-ssl and ucspi-tcp6 for IPv4 fixes - Move MESSAGE.tls to README.tls, and remove other MESSAGE* - Set PKG_HOME even for non-default values of QMAIL_ALIAS_USER - Check whether alias/.qmail-foo exist before trying to remove Bump PKGREVISION.
35 lines
834 B
Text
35 lines
834 B
Text
# $NetBSD: DEINSTALL,v 1.8 2019/08/20 02:38:04 schmonz Exp $
|
|
|
|
QMAILDIR=@QMAILDIR@
|
|
QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
|
|
|
|
VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
|
|
|
|
case "${STAGE}" in
|
|
|
|
DEINSTALL)
|
|
cd ${PKG_SYSCONFDIR}
|
|
for i in mailer-daemon postmaster root ${QMAIL_QUEUE_EXTRA}; do
|
|
f="alias/.qmail-${i}"
|
|
if [ -e ${f} ]; then
|
|
contents=$(${CAT} ${f})
|
|
if [ "${contents}" = '# pkgsrc says: replace this comment with your config' ] \
|
|
|| [ "${contents}" = '' ]; then
|
|
${RM} -f ${f}
|
|
fi
|
|
fi
|
|
done
|
|
for i in defaultdomain locals me plusdomain rcpthosts; do
|
|
${CMP} -s control/${i} .pkgsrc-defaults-do-not-edit/${i} \
|
|
&& ${RM} -f control/${i}
|
|
${RM} -f .pkgsrc-defaults-do-not-edit/${i}
|
|
done
|
|
|
|
cd ${QMAILDIR}
|
|
for dir in ${VAR_QMAIL_DIRS}; do
|
|
[ -h ${dir} ] \
|
|
&& ${RM} -f ${dir}
|
|
done
|
|
|
|
;;
|
|
esac
|