Fix: Update use of cmp to expect correct exit code
This update to the usage of `cmp` in the anchor scripts will cause the scripts to overwrite existing manifests whenever differences are detected. This should only occur during genesis, but may occur if a file is accidentily modified on a node and the anchor then checks the file for changes. Change-Id: Ic594fef2c5a5c30a5be3ccc7ab51efcd29c8cdcc
This commit is contained in:
parent
51df4ce078
commit
19a730a1c4
@ -18,7 +18,7 @@ set -x
|
||||
compare_copy_files() {
|
||||
|
||||
{{range .Values.anchor.files_to_copy}}
|
||||
if [ ! -e /host{{ .dest }} ] || cmp -s {{ .source }} /host{{ .dest }}; then
|
||||
if [ ! -e /host{{ .dest }} ] || ! cmp -s {{ .source }} /host{{ .dest }}; then
|
||||
mkdir -p $(dirname /host{{ .dest }})
|
||||
cp {{ .source }} /host{{ .dest }}
|
||||
fi
|
||||
|
@ -18,7 +18,7 @@ set -x
|
||||
compare_copy_files() {
|
||||
|
||||
{{range .Values.anchor.files_to_copy}}
|
||||
if [ ! -e /host{{ .dest }} ] || cmp -s {{ .source }} /host{{ .dest }}; then
|
||||
if [ ! -e /host{{ .dest }} ] || ! cmp -s {{ .source }} /host{{ .dest }}; then
|
||||
mkdir -p $(dirname /host{{ .dest }})
|
||||
cp {{ .source }} /host{{ .dest }}
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user