[Midnightbsd-cvs] src [11784] trunk/etc/periodic/daily/490.status-pkg-changes: add mport list check
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jul 11 19:54:08 EDT 2018
Revision: 11784
http://svnweb.midnightbsd.org/src/?rev=11784
Author: laffer1
Date: 2018-07-11 19:54:07 -0400 (Wed, 11 Jul 2018)
Log Message:
-----------
add mport list check
Added Paths:
-----------
trunk/etc/periodic/daily/490.status-pkg-changes
Added: trunk/etc/periodic/daily/490.status-pkg-changes
===================================================================
--- trunk/etc/periodic/daily/490.status-pkg-changes (rev 0)
+++ trunk/etc/periodic/daily/490.status-pkg-changes 2018-07-11 23:54:07 UTC (rev 11784)
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $MidnightBSD$
+#
+
+# 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 "$daily_status_pkg_changes_enable" in
+ [Yy][Ee][Ss])
+ if [ ! -f /usr/sbin/mport]; then
+ echo '$daily_status_pkg_changes_enable is enabled but' \
+ "/usr/sbin/mport doesn't exist"
+ rc=2
+ else
+ bak=/var/backups
+ rc=0
+
+ if [ -f $bak/pkg_info.bak ]; then
+ mv -f $bak/pkg_info.bak $bak/pkg_info.bak2
+ fi
+ ${pkg_info:-/usr/sbin/mport} > $bak/pkg_info.bak
+
+ cmp -sz $bak/pkg_info.bak $bak/pkg_info.bak2
+ if [ $? -eq 1 ]; then
+ echo ""
+ echo "Changes in installed packages:"
+ diff -U 0 $bak/pkg_info.bak2 $bak/pkg_info.bak \
+ | grep '^[-+][^-+]' | sort -k 1.2
+ fi
+ fi
+ ;;
+
+ *)
+ rc=0
+ ;;
+esac
+
+exit $rc
Property changes on: trunk/etc/periodic/daily/490.status-pkg-changes
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list