misc/183820: error in /usr/local/etc/periodic/security/410.pkg-audit

Christopher christomania at gmail.com
Sat Nov 9 20:20:01 UTC 2013

>Number:         183820
>Category:       misc
>Synopsis:       error in /usr/local/etc/periodic/security/410.pkg-audit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 09 20:20:00 UTC 2013
>Originator:     Christopher
>Release:        9.2-RELEASE
FreeBSD ******** 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root at bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
I think I found an error in one of the periodic security pkg scripts: /usr/local/etc/periodic/security/410.pkg-audit

the awk expression to set PKG_DBDIR variable is
awk -F: '$1 ~ /PKG_DBDIR$/ { print $2 }'

this does not work because the line is as
PKG_DBDIR: /.../....

so the variable PKG_DBDIR is " /.../..."
there is a space at the beginning of the script.

next the stat command failed because of the space
stat -f %m " /.../...."

you can run :

sh -f -x /usr/local/etc/periodic/security/410.pkg-audit
I suggest the following modification:

awk -F ': ' '$1 ~ /PKG_DBDIR$/ { print $2 }'


More information about the freebsd-bugs mailing list