Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge branch 'master' of github.com:freebsd/pkg
Matthew Seaman committed 12 years ago
commit 342287a59fd5b3f4bda1c926b53c1b8c41f46c04
parent 9f77b98
5 files changed +6 -10
modified scripts/periodic/400.status-pkg
@@ -7,10 +7,10 @@ if [ -r /etc/defaults/periodic.conf ]; then
    . /etc/defaults/periodic.conf
    source_periodic_confs
fi
+
pkgcmd=/usr/sbin/pkg

case "$weekly_status_pkg_enable" in
	[Yy][Ee][Ss])
-
	pkgcmd=/usr/local/sbin/pkg

	echo
	echo 'Checking for out of date packages:'
modified scripts/periodic/410.pkg-audit
@@ -37,11 +37,8 @@ if [ -r /etc/defaults/periodic.conf ]; then
fi

# Compute PKG_DBDIR from the config file.
-
if [ -z "${PKG_DBDIR}" ] && [ -f /usr/local/etc/pkg.conf ]; then
-
	PKG_DBDIR=`awk 'toupper($1) ~ /PKG_DBDIR/ { print $3 }' \
-
		< /usr/local/etc/pkg.conf`
-
fi
-
: ${PKG_DBDIR="/var/db/pkg"}
+
pkgcmd=/usr/sbin/pkg
+
PKG_DBDIR=`${pkgcmd} -vv | awk -F: '$1 ~ /PKG_DBDIR$/ { print $2 }'`
auditfile="${PKG_DBDIR}/auditfile"

rc=0
@@ -50,7 +47,6 @@ case "${daily_status_security_pkgaudit_enable:-YES}" in
	[Nn][Oo])
	;;
	*)
-
	pkgcmd=/usr/local/sbin/pkg

	echo
	echo 'Checking for packages with security vulnerabilities:'
modified scripts/periodic/411.pkg-backup
@@ -16,7 +16,7 @@ case "${daily_backup_pkgng_enable:-YES}" in
	*)
	bak="${daily_backup_pkgng_dir:-/var/backups}"
	bak_file="${bak}/pkgng.db"
-
	pkgcmd=/usr/local/sbin/pkg
+
	pkgcmd=/usr/sbin/pkg

	if ! ${pkgcmd} -N >/dev/null 2>&1 ; then
		echo 'pkg-backup is enabled but pkg is not used'
modified scripts/periodic/460.pkg-checksum
@@ -12,7 +12,7 @@ fi

case "${daily_status_security_pkg_checksum_enable}" in
	[Yy][Ee][Ss])
-
	pkgcmd=/usr/local/sbin/pkg
+
	pkgcmd=/usr/sbin/pkg

	echo
	echo 'Checking for packages with mismatched checksums:'
modified scripts/periodic/490.status-pkg-changes
@@ -10,7 +10,7 @@ fi

case "$daily_status_pkg_changes_enable" in
	[Yy][Ee][Ss])
-
	pkgcmd=/usr/local/sbin/pkg
+
	pkgcmd=/usr/sbin/pkg

	echo
	echo 'Changes in installed packages:'