summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/periodic.conf3
-rwxr-xr-xetc/periodic/weekly/400.status-pkg20
-rw-r--r--share/man/man5/periodic.conf.56
3 files changed, 29 insertions, 0 deletions
diff --git a/etc/defaults/periodic.conf b/etc/defaults/periodic.conf
index ee72787..528f780 100644
--- a/etc/defaults/periodic.conf
+++ b/etc/defaults/periodic.conf
@@ -132,6 +132,9 @@ weekly_catman_enable="NO" # Preformat man pages
weekly_noid_enable="NO" # Find unowned files
weekly_noid_dirs="/" # Look here
+# 340.status-pkg
+weekly_status_pkg_enable="NO" # Find out-of-date pkgs
+
# 999.local
weekly_local="/etc/weekly.local" # Local scripts
diff --git a/etc/periodic/weekly/400.status-pkg b/etc/periodic/weekly/400.status-pkg
new file mode 100755
index 0000000..aac228b
--- /dev/null
+++ b/etc/periodic/weekly/400.status-pkg
@@ -0,0 +1,20 @@
+#!/bin/sh -
+#
+# $FreeBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+case "$weekly_status_pkg_enable" in
+ [Yy][Ee][Ss])
+ echo ""
+ echo "Check for out of date packages:"
+
+ pkg_version -v | sed -n 's/^\([^ ]*\) *< */ \1 /p';;
+esac
diff --git a/share/man/man5/periodic.conf.5 b/share/man/man5/periodic.conf.5
index fd0e180..6d89f62 100644
--- a/share/man/man5/periodic.conf.5
+++ b/share/man/man5/periodic.conf.5
@@ -364,6 +364,11 @@ An orphaned file is one with an invalid owner or group.
(str) A list of directories under which orphaned files are searched for.
This would usually be set to
.Pa / .
+.It Ar weekly_status_pkg_dirs
+(bool) Set to
+.Dq YES
+if you want to report out-of-date packages installed using
+.Xr pkg_version 1 .
.It Ar weekly_local
(str) Set to a list of extra scripts that should be run after all other
weekly scripts.
@@ -406,6 +411,7 @@ is shared or distributed.
.Xr msgs 1 ,
.Xr netstat 1 ,
.Xr nice 1 ,
+.Xr pkg_version 1 ,
.Xr rdist 1 ,
.Xr rc.conf 5 ,
.Xr ac 8 ,
OpenPOWER on IntegriCloud