Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Make 410.pkg-audit more flexible
Baptiste Daroussin committed 12 years ago
commit 853b2a55b108a1e88eec04a3381810a62ca319c0
parent e794c72
1 file changed +2 -6
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:'