blob: 1bc9504eebb8219c45970ba0ef90970ed07e8978 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# $NetBSD: INSTALL,v 1.2 2004/07/24 09:19:15 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@"
case ${STAGE} in
POST-INSTALL)
for file in ${MAILWRAPPEES}; do
if [ -f ${file} ]; then
${ECHO} "Backing up ${file} as ${file}${MW_BACKUP_SFX}."
${MV} -f ${file} ${file}${MW_BACKUP_SFX}
${LN} -fs ${MAILWRAPPER} ${file}
fi
done
if [ ! -f ${MAILER_CONF} ]; then
for file in ${MAILWRAPPEES}; do
if [ -f ${file}.mailwrappee ]; then
${ECHO} "`${BASENAME} ${file}` ${file}${MW_BACKUP_SFX}" >> ${MAILER_CONF}
case ${file} in
*/sendmail)
${ECHO} "send-mail ${file}${MW_BACKUP_SFX}" >> ${MAILER_CONF}
;;
esac
fi
done
fi
if [ ! -f ${MAILER_CONF} ]; then
${CP} ${MAILER_CONF_SAMPLE} ${MAILER_CONF}
fi
${CAT} << EOF
===========================================================================
You may wish to customize the following files for ${PKGNAME}:
${MAILER_CONF}
===========================================================================
EOF
;;
esac
|