xymon-ext-scripts

Check-in [38b7539d05]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use jail names instead of JIDs so I can alpha-sort them
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:38b7539d05544de38c430b3ea3b2f00f46b7972042423bdc78783ffd09e8172d
User & Date: feld@feld.me 2015-12-07 20:19:23
Context
2016-08-15
22:30
First commit of a hack for checking base system vulns called baseaudit check-in: 35ae881f4c user: feld@feld.me tags: master, trunk
2015-12-07
20:19
Use jail names instead of JIDs so I can alpha-sort them check-in: 38b7539d05 user: feld@feld.me tags: master, trunk
20:00
Revert; that doesn't alpha sort. It sorts by JID which is meaningless. check-in: 78f186c1bc user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pkgaudit.sh.

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
echo "" >> ${TMPFILE}

# Run pkg audit and collect output for main host
pkg-static audit ${PKGAUDIT_FLAGS} ${VULNXML} >> ${TMPFILE} || export NONGREEN=1

# Check if we should run on jails too. Grep removes poudriere jails.
if [ ${PKGAUDIT_JAILS} = "YES" ]; then
	for i in $(jls | sed '1d' | egrep -v "${PKGAUDIT_JAILGREP}" | awk '{print $1}'); do
		JAILROOT=$(jls -j ${i} -h path | sed '1d')
		{ echo "" ;
		echo "##############################" ;
		echo "" ;
		echo "jail $(jls -j ${i} -h name | sed '/name/d') pkg audit status" ;
		echo "" ;
		pkg-static -o PKG_DBDIR=${JAILROOT}/var/db/pkg audit ${PKGAUDIT_FLAGS} ${VULNXML} ; } >> ${TMPFILE} || export NONGREEN=1







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
echo "" >> ${TMPFILE}

# Run pkg audit and collect output for main host
pkg-static audit ${PKGAUDIT_FLAGS} ${VULNXML} >> ${TMPFILE} || export NONGREEN=1

# Check if we should run on jails too. Grep removes poudriere jails.
if [ ${PKGAUDIT_JAILS} = "YES" ]; then
	for i in $(jls -N | sed '1d' | sort | egrep -v "${PKGAUDIT_JAILGREP}" | awk '{print $1}'); do
		JAILROOT=$(jls -j ${i} -h path | sed '1d')
		{ echo "" ;
		echo "##############################" ;
		echo "" ;
		echo "jail $(jls -j ${i} -h name | sed '/name/d') pkg audit status" ;
		echo "" ;
		pkg-static -o PKG_DBDIR=${JAILROOT}/var/db/pkg audit ${PKGAUDIT_FLAGS} ${VULNXML} ; } >> ${TMPFILE} || export NONGREEN=1