mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Make indenting consistent across the rest of the file
This commit is contained in:
parent
31149eb05d
commit
a2556d0528
1 changed files with 26 additions and 26 deletions
|
@ -82,14 +82,14 @@ REMOTECRIT=${remote_critical:-10}
|
|||
|
||||
MODE=$(echo "$0" | sed 's/.*_//')
|
||||
case "${MODE}" in
|
||||
'cve')
|
||||
TITLE_ADD="unique "
|
||||
FIELD=1
|
||||
;;
|
||||
'pkg' | *)
|
||||
TITLE_ADD="package "
|
||||
FIELD=2
|
||||
;;
|
||||
'cve')
|
||||
TITLE_ADD="unique "
|
||||
FIELD=1
|
||||
;;
|
||||
'pkg' | *)
|
||||
TITLE_ADD="package "
|
||||
FIELD=2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
@ -156,27 +156,27 @@ FIXED=$(printf '%s' "${ALL}" | grep -w '(fixed')
|
|||
|
||||
# Arguments: Field offset to aggregate by
|
||||
count_entries() {
|
||||
CUT_FIELD="${1}"
|
||||
cut -f "${CUT_FIELD}" -d " "| sort | uniq -c
|
||||
CUT_FIELD="${1}"
|
||||
cut -f "${CUT_FIELD}" -d " " | sort | uniq -c
|
||||
}
|
||||
|
||||
case "${MODE}" in
|
||||
'cve')
|
||||
remote_count=$(printf '%s' "${REMOTE}" | count_entries "${FIELD}" | wc -l)
|
||||
high_count=$(printf '%s' "${HIGH}" | count_entries "${FIELD}" | wc -l)
|
||||
medium_count=$(printf '%s' "${MEDIUM}" | count_entries "${FIELD}" | wc -l)
|
||||
low_count=$(printf '%s' "${LOW}" | count_entries "${FIELD}" | wc -l)
|
||||
other_count=$(printf '%s' "${OTHER}" | count_entries "${FIELD}" | wc -l)
|
||||
fixed_count=$(printf '%s' "${FIXED}" | count_entries "${FIELD}" | wc -l)
|
||||
;;
|
||||
'pkg' | *)
|
||||
remote_count=$(printf '%s' "${REMOTE}" | wc -l)
|
||||
high_count=$(printf '%s' "${HIGH}" | wc -l)
|
||||
medium_count=$(printf '%s' "${MEDIUM}" | wc -l)
|
||||
low_count=$(printf '%s' "${LOW}" | wc -l)
|
||||
other_count=$(printf '%s' "${OTHER}" | wc -l)
|
||||
fixed_count=$(printf '%s' "${FIXED}" | wc -l)
|
||||
;;
|
||||
'cve')
|
||||
remote_count=$(printf '%s' "${REMOTE}" | count_entries "${FIELD}" | wc -l)
|
||||
high_count=$(printf '%s' "${HIGH}" | count_entries "${FIELD}" | wc -l)
|
||||
medium_count=$(printf '%s' "${MEDIUM}" | count_entries "${FIELD}" | wc -l)
|
||||
low_count=$(printf '%s' "${LOW}" | count_entries "${FIELD}" | wc -l)
|
||||
other_count=$(printf '%s' "${OTHER}" | count_entries "${FIELD}" | wc -l)
|
||||
fixed_count=$(printf '%s' "${FIXED}" | count_entries "${FIELD}" | wc -l)
|
||||
;;
|
||||
'pkg' | *)
|
||||
remote_count=$(printf '%s' "${REMOTE}" | wc -l)
|
||||
high_count=$(printf '%s' "${HIGH}" | wc -l)
|
||||
medium_count=$(printf '%s' "${MEDIUM}" | wc -l)
|
||||
low_count=$(printf '%s' "${LOW}" | wc -l)
|
||||
other_count=$(printf '%s' "${OTHER}" | wc -l)
|
||||
fixed_count=$(printf '%s' "${FIXED}" | wc -l)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Reformat the output of the cut|sort|uniq... to a more human-friendly "item (count)" format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue