From 0ecaef56aeaafa84128ac6f06c62e5090220f86f Mon Sep 17 00:00:00 2001 From: Max Rottenkolber Date: Mon, 18 May 2015 12:45:40 +0200 Subject: [PATCH] [neutron-sync-agent] Only try updating confs when `git diff' return 1 as opposed to failing with other error codes (>1). --- src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh b/src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh index 06cf1e17c5..56b50608dc 100644 --- a/src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh +++ b/src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh @@ -45,7 +45,7 @@ while true; do cd $NEUTRON_DIR git fetch >/dev/null git diff --quiet origin/master >/dev/null 2>&1 - if [ $? != 0 -o $initial = true ]; then + if [ $? = 1 -o $initial = true ]; then log "Generating new configuration" git pull --rebase origin master >/dev/null 2>&1 git reflog expire --expire-unreachable=0 --all