Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Feb 2014 16:13:00 +0000
From:      Dan Langille <dan@dlangille.no-ip.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/186562: [UPDATE] ports-mgmt/jailaudit  make it work with pkg
Message-ID:  <1391875980.663641.78663.nullmailer@bast.unixathome.org>
Resent-Message-ID: <201402081620.s18GK1jU023978@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186562
>Category:       ports
>Synopsis:       [UPDATE] ports-mgmt/jailaudit  make it work with pkg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 08 16:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Dan Langille
>Release:        FreeBSD 9.2-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD bast.unixathome.org 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 03:25:02 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
When using pkg, be sure to use 'pkg audit', not portaudit.
	
>How-To-Repeat:
	
>Fix:

	

--- jailaudit.diff begins here ---
--- /usr/local/bin/jailaudit	2014-02-05 00:47:17.519847376 +0000
+++ ./jailaudit	2014-02-05 12:15:49.773125652 +0000
@@ -23,6 +23,8 @@
     hostname=`/bin/hostname`
 fi
 
+portaudit=/usr/local/sbin/portaudit
+
 action=$1
 mailaddrs=$2
 jailnames=$3
@@ -50,6 +52,7 @@
      PORTLIST_CMD () {
       jexec ${jid} ls -1 /var/db/pkg/ |grep -v '.sqlite$' |grep -v 'auditfile'
       ${pkgng_bin} -j ${jid} query -a '%n-%v'
+      portaudit="pkg audit"
      }
     else
      PORTLIST_CMD () {
@@ -68,7 +71,7 @@
     done
 
     for portname in `cat ${tmp_path}/_jailaudit_allports|sort|uniq`; do
-        /usr/local/sbin/portaudit $portname > ${tmp_path}/_$portname 2> /dev/null
+        ${portaudit} $portname > ${tmp_path}/_$portname 2> /dev/null
     done
 
     for jid in `JLS|awk '{print $1}'`; do
--- jailaudit.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1391875980.663641.78663.nullmailer>