git: 38d2b4db7853 - main - daily 440.status-mailq: avoid error from dma with submit queue

From: Mike Karels <karels_at_FreeBSD.org>
Date: Fri, 16 Dec 2022 15:13:47 UTC
The branch main has been updated by karels:

URL: https://cgit.FreeBSD.org/src/commit/?id=38d2b4db7853ecfb87b40e83a9b9de9985c2fdc1

commit 38d2b4db7853ecfb87b40e83a9b9de9985c2fdc1
Author:     Mike Karels <karels@FreeBSD.org>
AuthorDate: 2022-12-16 15:13:31 +0000
Commit:     Mike Karels <karels@FreeBSD.org>
CommitDate: 2022-12-16 15:13:31 +0000

    daily 440.status-mailq: avoid error from dma with submit queue
    
    dma(8) supports mailq, but not mailq -Ac to print the submission
    queue.  Don't try to print that queue from the daily script if
    mailq -Ac returns an error.
    
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D37713
---
 usr.sbin/periodic/etc/daily/440.status-mailq | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/periodic/etc/daily/440.status-mailq b/usr.sbin/periodic/etc/daily/440.status-mailq
index 515f9f42ead9..80f2ada21a3b 100755
--- a/usr.sbin/periodic/etc/daily/440.status-mailq
+++ b/usr.sbin/periodic/etc/daily/440.status-mailq
@@ -38,7 +38,7 @@ case "$daily_status_mailq_enable" in
 
 	    case "$daily_status_include_submit_mailq" in
 	    [Yy][Ee][Ss])
-		if [ -f /etc/mail/submit.cf ]
+		if [ -f /etc/mail/submit.cf ] && mailq -Ac >/dev/null 2>&1
 		then
 		    echo ""
 		    echo "Mail in submit queue:"