# Don't re-create if old config already looks good. In this case, init_done should be preserved. TODO: rename lc register to lc init, then should I remove this behavior??
# Don't re-create if old config already looks good. In this case, init_done should be preserved. TODO: rename lc register to lc init, then should I remove this behavior??
if[[-f"$fname"]];then
if[[-f"$fname"]];then
local oldconf="$(grep ^masterconf="$fname" 2>/dev/null)"
local oldpath="$(lci_conf_get_masterconf_path $fname)"
[["$oldconf"="$newconf"]]&&return 0
[["$oldpath"="$newpath"]]&&return 0
fi
fi
echo"$newconf" | tee"$fname"|| err "lci_overwrite_conf: unable to create $fname"||return$?