mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
[debian/debsecan_] Quote stragglers
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
75a476c2a7
commit
b2d742b243
1 changed files with 13 additions and 13 deletions
|
@ -145,18 +145,18 @@ FIXED=$(echo "${ALL}" | grep -w '(fixed')
|
||||||
|
|
||||||
# Arguments: Field offset to aggregate by
|
# Arguments: Field offset to aggregate by
|
||||||
count_entries() {
|
count_entries() {
|
||||||
CUT_FIELD=${1}
|
CUT_FIELD="${1}"
|
||||||
cut -f "${CUT_FIELD}" -d " "| sort | uniq -c
|
cut -f "${CUT_FIELD}" -d " "| sort | uniq -c
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${MODE}" in
|
case "${MODE}" in
|
||||||
'cve')
|
'cve')
|
||||||
remote_count=$(echo "${REMOTE}" | count_entries ${FIELD} | wc -l)
|
remote_count=$(echo "${REMOTE}" | count_entries "${FIELD}" | wc -l)
|
||||||
high_count=$(echo "${HIGH}" | count_entries ${FIELD} | wc -l)
|
high_count=$(echo "${HIGH}" | count_entries "${FIELD}" | wc -l)
|
||||||
medium_count=$(echo "${MEDIUM}" | count_entries ${FIELD} | wc -l)
|
medium_count=$(echo "${MEDIUM}" | count_entries "${FIELD}" | wc -l)
|
||||||
low_count=$(echo "${LOW}" | count_entries ${FIELD} | wc -l)
|
low_count=$(echo "${LOW}" | count_entries "${FIELD}" | wc -l)
|
||||||
other_count=$(echo "${OTHER}" | count_entries ${FIELD} | wc -l)
|
other_count=$(echo "${OTHER}" | count_entries "${FIELD}" | wc -l)
|
||||||
fixed_count=$(echo "${FIXED}" | count_entries ${FIELD} | wc -l)
|
fixed_count=$(echo "${FIXED}" | count_entries "${FIELD}" | wc -l)
|
||||||
;;
|
;;
|
||||||
'pkg' | *)
|
'pkg' | *)
|
||||||
remote_count=$(echo "${REMOTE}" | wc -l)
|
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
|
# The nested $(echo ...)s are needed to yet the newlines
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
remote.value $remote_count
|
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.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.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.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.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.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
|
EOF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue