diff --git a/tools/arkmanager b/tools/arkmanager index 2ff8ede..d800017 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -2975,13 +2975,15 @@ doPrintConfig(){ vals["$v"]="${!v}" done for cfgfile in "$configfile" "${HOME}/${arkstUserCfgFile}" "${arkstGlobalCfgFile}"; do - while read v; do - val="$(source "$cfgfile"; echo "${!v}")" - if [[ "$val" = "${vals[$v]}" && -z "${vars[$v]}" ]]; then - vars["$v"]="$cfgfile" - echo "${cfgfile} => ${v}" - fi - done < <(sed -n 's/^[[:space:]]*\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' <"$cfgfile") + if [ -r "$cfgfile" ]; then + while read v; do + val="$(source "$cfgfile"; echo "${!v}")" + if [[ "$val" = "${vals[$v]}" && -z "${vars[$v]}" ]]; then + vars["$v"]="$cfgfile" + echo "${cfgfile} => ${v}" + fi + done < <(sed -n 's/^[[:space:]]*\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' <"$cfgfile") + fi done }