From 3432ba57d65b213bb2d1ce2aa7da61108fc45875 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 18 Jul 2013 22:44:52 +0200 Subject: [PATCH] Initial support to resume aborted sync process. --- osync.sh | 63 +++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/osync.sh b/osync.sh index 323e4e0..1638faa 100755 --- a/osync.sh +++ b/osync.sh @@ -698,31 +698,30 @@ function Sync slave_delete_list ;& slave-replica-deleted-list.success|update-master-replica.fail|update-slave-replica.fail) - if [ "$CONFLICT_PREVALANCE" != "master" ] - then - sync_update_master - if [ $? != 0 ] - then - return 1 - fi - sync_update_slave - if [ $? != 0 ] - then - return 1 - fi - else - sync_update_slave - if [ $? != 0 ] - then - return 1 - fi - sync_update_master - if [ $? != 0 ] - then - return 1 - fi - fi - + if [ "$CONFLICT_PREVALANCE" != "master" ] + then + sync_update_master + if [ $? != 0 ] + then + return 1 + fi + sync_update_slave + if [ $? != 0 ] + then + return 1 + fi + else + sync_update_slave + if [ $? != 0 ] + then + return 1 + fi + sync_update_master + if [ $? != 0 ] + then + return 1 + fi + fi ;& update-slave-replica.success|update-master-replica.success|delete-propagation-slave.fail) delete_on_slave @@ -742,20 +741,6 @@ function Sync echo "sync.success" > $STATE_DIR/last-action } -function DummySync -{ - # launches foo bar cuu in this order - - # get last function, if last was error set err=1 - - # if sync.success && err=1 boo bar cuu - # set err=0 - # if sync.test && err=1 bar cuu - # set err=0 - # if sync.e cuu - echo merde -} - function SoftDelete { if [ "$CONFLICT_BACKUP" != "no" ]