]> git.8kb.co.uk Git - slony-i/slony_failover/blobdiff - slony_failover.pl
Make directory consistent in init.debian
[slony-i/slony_failover] / slony_failover.pl
index 32c938d00403490247b8a6b823001929d6c5b14c..be02cc5228f6e026b857aa0dcf7aa72f952a4eb1 100644 (file)
@@ -1168,7 +1168,7 @@ sub writeMoveSet {
                 if (($subs) && ($g_resubscribe_method eq 'subscribe')) { 
     
                     foreach my $other_subs (@g_cluster) {
-                        if (($other_subs->[6] ne "INACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) {
+                        if (($other_subs->[6] eq "ACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) {
 
                             if (exists $g_backups{$other_subs->[0]}) {
                                 $line_prefix = "# (Node $other_subs->[0] unavailable) ";
@@ -1236,7 +1236,7 @@ sub writeMoveSet {
             if (($subs) && ($g_resubscribe_method eq 'resubscribe')) { 
 
                 foreach my $other_subs (@g_cluster) {
-                    if (($other_subs->[6] ne "INACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) {
+                    if (($other_subs->[6] eq "ACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) {
                         if (exists $g_backups{$other_subs->[0]}) {
                             $line_prefix = "# (Node $other_subs->[0] unavailable) ";
                         }
@@ -1264,7 +1264,7 @@ sub writeMoveSet {
                                      print SLONFILE ($line_prefix .
                                         "ECHO 'Issuing resubscribe for provider $to -> receiver $other_subs->[0]';\n");
                                     print SLONFILE ($line_prefix . 
-                                        "SUBSCRIBE NODE ( ORIGIN = $to, PROVIDER = $to, RECEIVER = $other_subs->[0] );\n");
+                                        "RESUBSCRIBE NODE ( ORIGIN = $to, PROVIDER = $to, RECEIVER = $other_subs->[0] );\n");
                                  }            
                             }
                             else {