From 4484d23ba731b5a116bedf7b28421514aa70f53b Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 14 Sep 2000 17:19:15 +0000 Subject: Another overhaul of the periodic stuff. All periodic sub-scripts 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 --- etc/periodic/weekly/400.status-pkg | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'etc/periodic/weekly/400.status-pkg') 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 -- cgit v1.1