git: c7edee4fe7b8 - 2026Q3 - net-mgmt/monitoring-plugins: Remove sudo from check_mailq

Matthias Fechner <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch 2026Q3 has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c7edee4fe7b8744be7cec601207e11c8c4ed7e58

commit c7edee4fe7b8744be7cec601207e11c8c4ed7e58
Author:     Linus Sundqvist <[email protected]>
AuthorDate: 2026-08-18 08:04:24 +0000
Commit:     Matthias Fechner <[email protected]>
CommitDate: 2026-08-18 08:07:20 +0000

    net-mgmt/monitoring-plugins: Remove sudo from check_mailq
    
    Fixes error:
    /usr/local/libexec/nagios/check_mailq
    Global symbol "$sudo" requires explicit package name (did you forget to declare "my $sudo"?) at /usr/local/libexec/nagios/check_mailq line 580.
    Execution of /usr/local/libexec/nagios/check_mailq aborted due to compilation errors.
    
    Upstream removed sudo for check_mailq completely in version 3.0.3.
    
    Changes:        https://github.com/monitoring-plugins/monitoring-plugins/releases/tag/v3.0.3
    PR:             297472
    (cherry picked from commit 584c15e5a78c722e7aa3ebcb02f6c92d16513166)
---
 net-mgmt/monitoring-plugins/Makefile                                    | 1 +
 net-mgmt/monitoring-plugins/files/patch-plugins-scripts_check__mailq.pl | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/net-mgmt/monitoring-plugins/Makefile b/net-mgmt/monitoring-plugins/Makefile
index c0fc97c87954..f98c79a9a4c3 100644
--- a/net-mgmt/monitoring-plugins/Makefile
+++ b/net-mgmt/monitoring-plugins/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	monitoring-plugins
 PORTVERSION=	3.0.3
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	https://www.monitoring-plugins.org/download/ \
 		LOCAL/mat/${PORTNAME}
diff --git a/net-mgmt/monitoring-plugins/files/patch-plugins-scripts_check__mailq.pl b/net-mgmt/monitoring-plugins/files/patch-plugins-scripts_check__mailq.pl
index fc244ca94d41..b94fd8277ee0 100644
--- a/net-mgmt/monitoring-plugins/files/patch-plugins-scripts_check__mailq.pl
+++ b/net-mgmt/monitoring-plugins/files/patch-plugins-scripts_check__mailq.pl
@@ -8,7 +8,7 @@
 +elsif ( $mailq eq "opensmtp" ) {
 +       ## open mailq
 +       if ( defined $utils::PATH_TO_MAILQ && -x $utils::PATH_TO_MAILQ ) {
-+               if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ | " ) ) {
++               if (! open (MAILQ, "$utils::PATH_TO_MAILQ | " ) ) {
 +                       print "ERROR: could not open $utils::PATH_TO_MAILQ \n";
 +                       exit $ERRORS{'UNKNOWN'};
 +               }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.