mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Add comments for evals
This commit is contained in:
parent
fe8908c326
commit
289b99d401
@ -495,7 +495,9 @@ config() {
|
||||
local line t fields field type draw label
|
||||
while IFS= read -r line
|
||||
do
|
||||
eval 't=(' "$line" ')'
|
||||
# split line into field,type,draw,label
|
||||
# eval looks necessary to preserve whitespaces
|
||||
eval "t=( ${line} )"
|
||||
field="${t[0]}"
|
||||
[ -z "$field" ] && continue
|
||||
fields+=( $field )
|
||||
@ -511,13 +513,19 @@ config() {
|
||||
echo graph_order "${fields[@]}"
|
||||
}
|
||||
|
||||
# wrapper for getfield_*
|
||||
getfield() {
|
||||
if [ -n "${getfield_func[$module]:-}" ]; then
|
||||
# call getfield_* function with args if necessary
|
||||
# eval looks necessary if args contain whitespaces
|
||||
eval "${getfield_func[$module]}"
|
||||
fi
|
||||
}
|
||||
|
||||
# wrapper for getvalue_*
|
||||
getvalue() {
|
||||
# call getvalue_* function with args if necessary
|
||||
# eval looks necessary if args contain whitespaces
|
||||
eval "${getvalue_func[$module]}"
|
||||
}
|
||||
|
||||
@ -525,7 +533,9 @@ getvalue_sysstat() {
|
||||
local line t field label
|
||||
while IFS= read -r line
|
||||
do
|
||||
eval 't=(' "$line" ')'
|
||||
# split line into field,type,draw,label
|
||||
# eval looks necessary to preserve whitespaces
|
||||
eval "t=( ${line} )"
|
||||
field="${t[0]}"
|
||||
[ -z "$field" ] && continue
|
||||
label="${t[3]}"
|
||||
@ -550,7 +560,9 @@ getvalue_sgainfo() {
|
||||
local line t field label
|
||||
while IFS= read -r line
|
||||
do
|
||||
eval 't=(' "$line" ')'
|
||||
# split line into field,type,draw,label
|
||||
# eval looks necessary to preserve whitespaces
|
||||
eval "t=( ${line} )"
|
||||
field="${t[0]}"
|
||||
[ -z "$field" ] && continue
|
||||
label="${t[3]}"
|
||||
@ -575,7 +587,9 @@ getvalue_pgastat() {
|
||||
local line t field label
|
||||
while IFS= read -r line
|
||||
do
|
||||
eval 't=(' "$line" ')'
|
||||
# split line into field,type,draw,label
|
||||
# eval looks necessary to preserve whitespaces
|
||||
eval "t=( ${line} )"
|
||||
field="${t[0]}"
|
||||
[ -z "$field" ] && continue
|
||||
label="${t[3]}"
|
||||
|
Loading…
Reference in New Issue
Block a user