Skip to content
Snippets Groups Projects
Commit b77e5c76 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

save config diffs

parent 8f76bdeb
No related branches found
No related tags found
No related merge requests found
...@@ -128,8 +128,14 @@ if [ $? -eq 0 ]; then ...@@ -128,8 +128,14 @@ if [ $? -eq 0 ]; then
fi fi
# --- create target file # --- create target file
diff "${tmpfile}" "${outfile}" >> ${cfgdiff} 2>/dev/null bHasChanges=0
if [ $? -eq 0 -a -f "${outfile}" ]; then if [ ! -f "${outfile}" ]; then
echo "File did not exist before: ${outfile} - creating it as a new file.">> ${cfgdiff}
bHasChanges=1
fi
diff "${tmpfile}" "${outfile}" >> ${cfgdiff} 2>/dev/null || bHasChanges=1
if [ $bHasChanges -eq 0 ]; then
_warn "INFO: no changes." _warn "INFO: no changes."
else else
mv -f "${tmpfile}" "${outfile}" || exit 4 mv -f "${tmpfile}" "${outfile}" || exit 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment