From a73a63621ed2c455a5bbd72e93ecd0859f8d7150 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 29 Sep 2013 13:22:22 +0000 Subject: Total screws up display for many file systems. Don't make it the default --- minimunin | 1 - test/conftest | 54 ++++++++++++++++++++++++++---------------------------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/minimunin b/minimunin index b427c95..cca7edb 100755 --- a/minimunin +++ b/minimunin @@ -330,7 +330,6 @@ cat <<-EOF graph_args --base 1024 --lower-limit 0 graph_vlabel bytes graph_category disk - graph_total Total EOF /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,linsysfs,nfs,nullfs | /usr/bin/tail -n +2 | while read fs blocks used avail cap mount; do diff --git a/test/conftest b/test/conftest index e202e87..5b5a45c 100755 --- a/test/conftest +++ b/test/conftest @@ -3,35 +3,33 @@ CONFIG_DIR=./configs CONFIGS=`/usr/bin/find ${CONFIG_DIR} -type f -exec /usr/bin/grep -v -e ^\# -e ^$ {} \; -exec /bin/echo [] \; 2> /dev/null` -parse_lines() { - unset in_sect - while read line; do - case ${line## } in - \[*\]) v="${line#*[}"; v="${v%%]*}" - case $select in - ${v}) echo Starting our section "${select}" >&2 - in_sect=true - ;; - *) [ "${in_sect}" ] && echo Ending our section "${select}" >&2 - echo Start other section "${v}" >&2 - unset in_sect - ;; - esac - ;; - env.*) echo "### ${line} ### ${in_sect} ###" >&2 - [ "${in_sect}" ] || continue - echo Setting environment: ${line#*env.} >&2 - _pref=${line#*env.}; _suf=${_pref#* } - printf "%s " ${_pref%% *}=\'${_suf}\' - ;; - *) echo Ignoring ${line} >&2 - ;; - esac - done -} - select=blubber -_env=$( printf "%s\n" "${CONFIGS}" | parse_lines ) + +unset in_sect +while read line; do + case ${line## } in + \[*\]) case [$select in + ${line%%]*}) echo Starting our section "${select}" >&2 + in_sect=true + ;; + *) [ "${in_sect}" ] && echo Ending our section "${select}" >&2 + echo Start other section "${line%%]*}" >&2 + unset in_sect + ;; + esac + ;; + env.*) echo "### ${line} ### ${in_sect} ###" >&2 + [ "${in_sect}" ] || continue + echo Setting environment: ${line#*env.} >&2 + _pref=${line#*env.}; _suf=${_pref#* } + _env="${_env} ${_pref%% *}='${_suf}'" + ;; + *) echo Ignoring ${line} >&2 + ;; + esac +done <