Fix diff return code in hosts element

diff exits non-zero when a diff actually exists. This causes 51-hosts to
exit and fails the os-refresh-config run. This issue is manifested when
doing a stack-update and a new host is added to the stack.

Closes-Bug: #1355646

Change-Id: Ia0e3670960b4b136fda9b09c188baf1f23d45d6b
This commit is contained in:
James Slagle 2014-08-18 18:33:23 -04:00
parent 9f79e4cef0
commit 6bb2bab564
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ write_entries() {
f=1
}f &&!/^# HEAT_HOSTS_END$/{next}/^# HEAT_HOSTS_END$/{f=0}!f' "$file" > "$temp"
echo "INFO: Updating hosts file $file, check below for changes"
diff "$file" "$temp"
diff "$file" "$temp" || true
cat "$temp" > "$file"
else
echo -ne "\n# HEAT_HOSTS_START - Do not edit manually within this section!\n" >> "$file"