summaryrefslogtreecommitdiffstats
path: root/etc/periodic
diff options
context:
space:
mode:
authormatteo <matteo@FreeBSD.org>2006-03-08 17:26:53 +0000
committermatteo <matteo@FreeBSD.org>2006-03-08 17:26:53 +0000
commitb19c8d2fcc1540312b520fc757d445026667a6ac (patch)
treed66b59422626303a11c7e31b0ef9a347ef3e91f1 /etc/periodic
parent6835aad53cb19d358930e5b7cd187a7b63ea20f6 (diff)
downloadFreeBSD-src-b19c8d2fcc1540312b520fc757d445026667a6ac.zip
FreeBSD-src-b19c8d2fcc1540312b520fc757d445026667a6ac.tar.gz
Fix output and exit status when daily_mailq_shorten is set to YES
PR: conf/93472 MFC after: 3
Diffstat (limited to 'etc/periodic')
-rwxr-xr-xetc/periodic/daily/440.status-mailq14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/periodic/daily/440.status-mailq b/etc/periodic/daily/440.status-mailq
index 244ff6e..b75e858 100755
--- a/etc/periodic/daily/440.status-mailq
+++ b/etc/periodic/daily/440.status-mailq
@@ -29,11 +29,12 @@ case "$daily_status_mailq_enable" in
sort |
uniq -c |
sort -nr |
- awk '$1 > 1 {print $1, $2}';;
+ awk '$1 >= 1 {print $1, $2}';;
*)
mailq;;
- esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l)
- [ $rc -gt 1 ] && rc=1 || rc=0
+ esac | tee /dev/stderr |
+ egrep -v '(mqueue is empty|Total requests)' | wc -l)
+ [ $rc -gt 0 ] && rc=1 || rc=0
case "$daily_status_include_submit_mailq" in
[Yy][Ee][Ss])
@@ -49,11 +50,12 @@ case "$daily_status_mailq_enable" in
sort |
uniq -c |
sort -nr |
- awk '$1 > 1 {print $1, $2}';;
+ awk '$1 >= 1 {print $1, $2}';;
*)
mailq -Ac;;
- esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l)
- [ $rc_submit -gt 1 ] && rc=1
+ esac | tee /dev/stderr |
+ egrep -v '(mqueue is empty|Total requests)' | wc -l)
+ [ $rc_submit -gt 0 ] && rc=1
fi;;
esac
fi;;
OpenPOWER on IntegriCloud