From c47d55cc4904dd99a4e15d8945701f8073665963 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 12 Feb 2013 15:37:16 +0100 Subject: [PATCH] marsadm: fix --force for switching to secondary --- userspace/marsadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/marsadm b/userspace/marsadm index 1d8f5d08..95eb5b24 100644 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -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";