summaryrefslogtreecommitdiffstats
path: root/etc/periodic/weekly/400.status-pkg
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-09-14 17:19:15 +0000
committerbrian <brian@FreeBSD.org>2000-09-14 17:19:15 +0000
commit4484d23ba731b5a116bedf7b28421514aa70f53b (patch)
treec37ec10ec51a7430c5a8044972107e92a18f16b0 /etc/periodic/weekly/400.status-pkg
parentd63a19c1e21807290eba99997d2935286893fede (diff)
downloadFreeBSD-src-4484d23ba731b5a116bedf7b28421514aa70f53b.zip
FreeBSD-src-4484d23ba731b5a116bedf7b28421514aa70f53b.tar.gz
Another overhaul of the periodic stuff.
All periodic sub-scripts <larf> now have their return codes interpreted by periodic(8). Output may be masked based on variable values in periodic.conf. It's also now possible to email periodic output to arbitrary addresses, or to send it to a log file, examples of which can be found in newsyslog.conf. The upshot of it all should be no discernable changes to the default behaviour of periodic(8). PR: 21250
Diffstat (limited to 'etc/periodic/weekly/400.status-pkg')
-rwxr-xr-xetc/periodic/weekly/400.status-pkg10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/periodic/weekly/400.status-pkg b/etc/periodic/weekly/400.status-pkg
index aac228b..050b47b 100755
--- a/etc/periodic/weekly/400.status-pkg
+++ b/etc/periodic/weekly/400.status-pkg
@@ -16,5 +16,13 @@ case "$weekly_status_pkg_enable" in
echo ""
echo "Check for out of date packages:"
- pkg_version -v | sed -n 's/^\([^ ]*\) *< */ \1 /p';;
+ rc=$(pkg_version -v |
+ sed -n 's/^\([^ ]*\) *< */ \1 /p' |
+ tee /dev/stderr |
+ wc -l)
+ [ $rc -gt 1 ] && rc=1;;
+
+ *) rc=0;;
esac
+
+exit $rc
OpenPOWER on IntegriCloud