marsadm: fix --force for switching to secondary

This commit is contained in:
Thomas Schoebel-Theuer 2013-02-12 15:37:16 +01:00
parent 9272780a32
commit c47d55cc49
1 changed files with 1 additions and 1 deletions

View File

@ -783,7 +783,7 @@ sub primary_res {
my $pri = "$mars/resource-$res/primary";
my $old = readlink($pri) or ldie "cannot determine current primary\n";
if($sec) {
ldie "for safety reasons, switching to secondary is only allowed when I ($host) am primary\n" if($old ne $host);
ldie "for safety reasons, switching to secondary is only allowed when I ($host) am primary\n" if ($old ne $host) && !$force;
$host = "(none)";
} elsif($old eq $host) {
lprint "I am already primary.\n";