pkgsrc/mail/mailwrapper/DEINSTALL
jlam 88718cbf67 Fix bug where deinstallation wouldn't restore the original sendmail, etc.
as reported on tech-pkg@.  Bump the PKGREVISION.
2004-08-10 21:46:34 +00:00

21 lines
612 B
Text

# $NetBSD: DEINSTALL,v 1.3 2004/08/10 21:46:34 jlam Exp $
MAILWRAPPEES="@MAILWRAPPEES@"
MAILWRAPPER="${PKG_PREFIX}/sbin/mailwrapper"
MAILER_CONF="${PKG_SYSCONFDIR}/mailer.conf"
MAILER_CONF_SAMPLE="${PKG_PREFIX}/share/examples/mailwrapper/mailer.conf.sendmail"
MW_BACKUP_SFX="@MAILWRAPPER_BACKUP_SFX@"
ALL_FILES="${ALL_FILES} ${MAILER_CONF_SAMPLE} ${MAILER_CONF}"
case ${STAGE} in
DEINSTALL)
for file in ${MAILWRAPPEES}; do
if [ -f ${file}${MW_BACKUP_SFX} ]; then
${ECHO} "Restoring ${file}${MW_BACKUP_SFX} to ${file}."
${RM} -f ${file}
${MV} -f ${file}${MW_BACKUP_SFX} ${file}
fi
done
;;
esac