2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

[debian/debsecan_] Quote stragglers

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
Olivier Mehani 2017-04-27 12:17:13 +10:00
parent 75a476c2a7
commit b2d742b243

View File

@ -145,18 +145,18 @@ FIXED=$(echo "${ALL}" | grep -w '(fixed')
# Arguments: Field offset to aggregate by
count_entries() {
CUT_FIELD=${1}
CUT_FIELD="${1}"
cut -f "${CUT_FIELD}" -d " "| sort | uniq -c
}
case "${MODE}" in
'cve')
remote_count=$(echo "${REMOTE}" | count_entries ${FIELD} | wc -l)
high_count=$(echo "${HIGH}" | count_entries ${FIELD} | wc -l)
medium_count=$(echo "${MEDIUM}" | count_entries ${FIELD} | wc -l)
low_count=$(echo "${LOW}" | count_entries ${FIELD} | wc -l)
other_count=$(echo "${OTHER}" | count_entries ${FIELD} | wc -l)
fixed_count=$(echo "${FIXED}" | count_entries ${FIELD} | wc -l)
remote_count=$(echo "${REMOTE}" | count_entries "${FIELD}" | wc -l)
high_count=$(echo "${HIGH}" | count_entries "${FIELD}" | wc -l)
medium_count=$(echo "${MEDIUM}" | count_entries "${FIELD}" | wc -l)
low_count=$(echo "${LOW}" | count_entries "${FIELD}" | wc -l)
other_count=$(echo "${OTHER}" | count_entries "${FIELD}" | wc -l)
fixed_count=$(echo "${FIXED}" | count_entries "${FIELD}" | wc -l)
;;
'pkg' | *)
remote_count=$(echo "${REMOTE}" | wc -l)
@ -175,15 +175,15 @@ CVECOUNTRE="s/^ *\([0-9]\+\) \+\([^ ]\+\)/\2 (\1)/"
# The nested $(echo ...)s are needed to yet the newlines
cat <<EOF
remote.value $remote_count
remote.extinfo $(echo $(echo "${REMOTE}" | count_entries ${FIELD} | sort -nr | sed "${CVECOUNTRE}"))
remote.extinfo $(echo $(echo "${REMOTE}" | count_entries "${FIELD}" | sort -nr | sed "${CVECOUNTRE}"))
high.value $high_count
high.extinfo $(echo $(echo "${HIGH}" | count_entries ${FIELD} | sort -nr | sed "${CVECOUNTRE}"))
high.extinfo $(echo $(echo "${HIGH}" | count_entries "${FIELD}" | sort -nr | sed "${CVECOUNTRE}"))
medium.value $medium_count
medium.extinfo $(echo $(echo "${MEDIUM}" | count_entries ${FIELD} | sort -nr | sed "${CVECOUNTRE}"))
medium.extinfo $(echo $(echo "${MEDIUM}" | count_entries "${FIELD}" | sort -nr | sed "${CVECOUNTRE}"))
low.value $low_count
low.extinfo $(echo $(echo "${LOW}" | count_entries ${FIELD} | sort -nr | sed "${CVECOUNTRE}"))
low.extinfo $(echo $(echo "${LOW}" | count_entries "${FIELD}" | sort -nr | sed "${CVECOUNTRE}"))
other.value $other_count
other.extinfo $(echo $(echo "${OTHER}" | count_entries ${FIELD} | sort -nr | sed "${CVECOUNTRE}"))
other.extinfo $(echo $(echo "${OTHER}" | count_entries "${FIELD}" | sort -nr | sed "${CVECOUNTRE}"))
fixed.value $fixed_count
fixed.extinfo $(echo $(echo "${FIXED}" | count_entries ${FIELD} | sort -nr | sed "${CVECOUNTRE}"))
fixed.extinfo $(echo $(echo "${FIXED}" | count_entries "${FIELD}" | sort -nr | sed "${CVECOUNTRE}"))
EOF