mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51: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/.*_//')
|
MODE=$(echo "$0" | sed 's/.*_//')
|
||||||
case "${MODE}" in
|
case "${MODE}" in
|
||||||
'cve')
|
'cve')
|
||||||
TITLE_ADD="unique "
|
TITLE_ADD="unique "
|
||||||
FIELD=1
|
FIELD=1
|
||||||
;;
|
;;
|
||||||
'pkg' | *)
|
'pkg' | *)
|
||||||
TITLE_ADD="package "
|
TITLE_ADD="package "
|
||||||
FIELD=2
|
FIELD=2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
|
@ -156,27 +156,27 @@ FIXED=$(printf '%s' "${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=$(printf '%s' "${REMOTE}" | count_entries "${FIELD}" | wc -l)
|
remote_count=$(printf '%s' "${REMOTE}" | count_entries "${FIELD}" | wc -l)
|
||||||
high_count=$(printf '%s' "${HIGH}" | 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)
|
medium_count=$(printf '%s' "${MEDIUM}" | count_entries "${FIELD}" | wc -l)
|
||||||
low_count=$(printf '%s' "${LOW}" | 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)
|
other_count=$(printf '%s' "${OTHER}" | count_entries "${FIELD}" | wc -l)
|
||||||
fixed_count=$(printf '%s' "${FIXED}" | count_entries "${FIELD}" | wc -l)
|
fixed_count=$(printf '%s' "${FIXED}" | count_entries "${FIELD}" | wc -l)
|
||||||
;;
|
;;
|
||||||
'pkg' | *)
|
'pkg' | *)
|
||||||
remote_count=$(printf '%s' "${REMOTE}" | wc -l)
|
remote_count=$(printf '%s' "${REMOTE}" | wc -l)
|
||||||
high_count=$(printf '%s' "${HIGH}" | wc -l)
|
high_count=$(printf '%s' "${HIGH}" | wc -l)
|
||||||
medium_count=$(printf '%s' "${MEDIUM}" | wc -l)
|
medium_count=$(printf '%s' "${MEDIUM}" | wc -l)
|
||||||
low_count=$(printf '%s' "${LOW}" | wc -l)
|
low_count=$(printf '%s' "${LOW}" | wc -l)
|
||||||
other_count=$(printf '%s' "${OTHER}" | wc -l)
|
other_count=$(printf '%s' "${OTHER}" | wc -l)
|
||||||
fixed_count=$(printf '%s' "${FIXED}" | wc -l)
|
fixed_count=$(printf '%s' "${FIXED}" | wc -l)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Reformat the output of the cut|sort|uniq... to a more human-friendly "item (count)" format
|
# 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