tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

net/nagios-plugins mailq-command (was: mail/postfix: install bin/{mailq,newaliases}?)



[...]
> 3. On a build server with pkgsrc postfix installed, net/nagios-plugins 
>    configures it check_mailq to call /usr/pkg/bin/mailq, which fails on 
>    systems without pkgsrc postfix installed (while calling /usr/bin/mailq 
>    would work regardless of postfix being installed or not).
[...]
> 3. should be dealt with by teaching the configury to use /usr/bin/mailq if 
>    present whenever /etc/mailer.conf exists or it's a link to 
>    /usr/sbin/mailwrapper.
What about the attached patch?
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/nagios-plugins/Makefile,v
retrieving revision 1.46
diff -u -r1.46 Makefile
--- Makefile	3 Sep 2017 08:53:12 -0000	1.46
+++ Makefile	13 Feb 2018 18:29:34 -0000
@@ -74,6 +77,11 @@
 CONFIGURE_ARGS+=	--with-ping6-command="${PING6_CMD}"
 .endif
 
+# Don't accidently pick up mailq from mail/postfix installed on the build system.
+.if ${${TOOLS_PLATFORM.readlink} /usr/bin/mailq || echo NO:L:sh} == "/usr/sbin/mailwrapper"
+CONFIGURE_ARGS+=	--with-mailq-command=/usr/bin/mailq
+.endif
+
 post-install:
 	${CHMOD} -x ${DESTDIR}${PREFIX}/libexec/nagios/utils.pm
 


Home | Main Index | Thread Index | Old Index