conf/92299: [patch] /etc/periodic/daily/440.status-mailq exits with
1 even if mail queues are empty.
Petr Rehor
prehor at gmail.com
Wed Jan 25 02:00:22 PST 2006
>Number: 92299
>Category: conf
>Synopsis: [patch] /etc/periodic/daily/440.status-mailq exits with 1 even if mail queues are empty.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 25 10:00:19 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Petr Rehor
>Release: FreeBSD 6.0-RELEASE-c3 i386
>Organization:
>Environment:
System: FreeBSD charon.rx.cz 6.0-RELEASE-c3 FreeBSD 6.0-RELEASE-c3 #0: Tue Nov 8 20:44:39 UTC 2005 root at marvin.rx.cz:/usr/obj/usr/src/sys/GENERIC i386
>Description:
/etc/periodic/daily/440.status-mailq exits with 1 (some informations on output)
instead of 0 (nothing notable on output) when mail queues are empty .
>How-To-Repeat:
When you have empty mail queues run:
/etc/periodic/daily/440.status-mailq; echo $?
>Fix:
--- 440.status-mailq.diff begins here ---
--- 440.status-mailq.orig Wed Jan 25 10:28:09 2006
+++ 440.status-mailq Wed Jan 25 10:38:09 2006
@@ -33,7 +33,7 @@
*)
mailq;;
esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l)
- [ $rc -gt 1 ] && rc=1
+ [ $rc -gt 1 ] && rc=1 || rc=0
case "$daily_status_include_submit_mailq" in
[Yy][Ee][Ss])
@@ -42,7 +42,7 @@
echo ""
echo "Mail in submit queue:"
- rc=$(case "$daily_status_mailq_shorten" in
+ rc_submit=$(case "$daily_status_mailq_shorten" in
[Yy][Ee][Ss])
mailq -Ac |
egrep -e '^[[:space:]]+[^[:space:]]+@' |
@@ -53,7 +53,7 @@
*)
mailq -Ac;;
esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l)
- [ $rc -gt 1 ] && rc=1
+ [ $rc_submit -gt 1 ] && rc=1
fi;;
esac
fi;;
--- 440.status-mailq.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list