summaryrefslogtreecommitdiffstats
path: root/mail/mailman/files/pkg-install.in
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2016-03-02 00:12:11 +0000
committermandree <mandree@FreeBSD.org>2016-03-02 00:12:11 +0000
commita18834c1673913b911cea716aeb6eba1438ba7a3 (patch)
treebffde49fac512bf1db8fb454209c4ea61a0a0fcb /mail/mailman/files/pkg-install.in
parent65672035e95bbd71c4305b775ae3a52f5be5a767 (diff)
downloadFreeBSD-ports-a18834c1673913b911cea716aeb6eba1438ba7a3.zip
FreeBSD-ports-a18834c1673913b911cea716aeb6eba1438ba7a3.tar.gz
Make sure pkg-install works with postfix-base, too.
Prior to this fix, pkg-install used hardcoded ${PKG_PREFIX}/sbin/postconf, but postfix-base installs it into /usr/sbin/postconf. Instead, do a path search for postconf in ${PKG_PREFIX}/sbin:$PATH and cache the result in a variable.
Diffstat (limited to 'mail/mailman/files/pkg-install.in')
-rw-r--r--mail/mailman/files/pkg-install.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/mailman/files/pkg-install.in b/mail/mailman/files/pkg-install.in
index 589500e..90d4f05 100644
--- a/mail/mailman/files/pkg-install.in
+++ b/mail/mailman/files/pkg-install.in
@@ -109,13 +109,14 @@ POST-INSTALL)
echo "---> Running assorted other checks"
if egrep -q "^[ \t]*MTA.*=.*Postfix" "%%MAILMANDIR%%/Mailman/mm_cfg.py" ; then
# run Postfix-specific checks
- if [ "x`${PKG_PREFIX}/sbin/postconf -h myhostname`" != "xlocalhost" ] \
- && ! egrep -q "^[ \t]*SMTPHOST.*=.*`${PKG_PREFIX}/sbin/postconf -h myhostname`" \
+ POSTCONF=$(PATH="${PKG_PREFIX}/sbin:/usr/sbin:/sbin:$PATH" which postconf)
+ if [ "x`${POSTCONF} -h myhostname`" != "xlocalhost" ] \
+ && ! egrep -q "^[ \t]*SMTPHOST.*=.*`${POSTCONF} -h myhostname`" \
"%%MAILMANDIR%%/Mailman/mm_cfg.py"
then
echo ""
echo "Your Postfix hostname is non-default."
- echo -n "You must add \"SMTPHOST = '`${PKG_PREFIX}/sbin/postconf -h myhostname`'"
+ echo -n "You must add \"SMTPHOST = '`${POSTCONF} -h myhostname`'"
echo "\" to the bottom of mm_cfg.py (without quotes)."
echo ""
fi
OpenPOWER on IntegriCloud