xymon-ext-scripts

Check-in [8724c39bb0]
Login

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

Overview
Comment:Consolidate redirection
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 8724c39bb0057fb847600d7750dfaa0ed23cee0e3d183fec535cfb5aee714811
User & Date: feld@feld.me 2015-03-16 13:01:56
Context
2015-03-16
13:03
Quote variable to prevent word splitting check-in: c0dba09309 user: feld@feld.me tags: master, trunk
13:01
Consolidate redirection check-in: 8724c39bb0 user: feld@feld.me tags: master, trunk
12:49
Shellcheck fixes check-in: 9141752393 user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pkgaudit.sh.

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Jail checks below don't need -F as it was done here.
pkg-static audit ${FETCH} ${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 "" >> ${TMPFILE}
		echo "##############################" >> ${TMPFILE}
		echo "" >> ${TMPFILE}
		echo "jail $(jexec ${i} hostname) pkg audit status" >> ${TMPFILE}
		pkg-static -o PKG_DBDIR=${JAILROOT}/var/db/pkg audit ${VULNXML} >> ${TMPFILE} || export NONGREEN=1
	done
fi

# Ingest all the pkg audit messages.
MSG=$(cat ${TMPFILE})

# NONGREEN was detected.







|
|
|
|
|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Jail checks below don't need -F as it was done here.
pkg-static audit ${FETCH} ${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 $(jexec ${i} hostname) pkg audit status" ;
		pkg-static -o PKG_DBDIR=${JAILROOT}/var/db/pkg audit ${VULNXML} ; } > ${TMPFILE} || export NONGREEN=1
	done
fi

# Ingest all the pkg audit messages.
MSG=$(cat ${TMPFILE})

# NONGREEN was detected.