cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: rohara@sourceware.org <rohara@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/fence/agents/scsi fence_scsi
Date: 29 Jun 2006 20:36:12 -0000	[thread overview]
Message-ID: <20060629203612.12324.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rohara at sourceware.org	2006-06-29 20:36:12

Modified files:
	fence/agents/scsi: fence_scsi 

Log message:
	Fix perl cmd declaration that caused sg_persist to fail.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/fence_scsi.diff?cvsroot=cluster&r1=1.1&r2=1.2

--- cluster/fence/agents/scsi/fence_scsi	2006/06/29 17:23:12	1.1
+++ cluster/fence/agents/scsi/fence_scsi	2006/06/29 20:36:12	1.2
@@ -155,26 +155,25 @@
 
     my $host_key = get_key($name);
     my $node_key = get_key($opt_n);
+    
+    my $cmd;
+    my ($in, $out, $err);
 
     foreach $dev (@volumes)
     {
-	my ($in, $out, $err);
-
 	if ($host_key eq $node_key)
 	{
-	    my $cmd = "sg_persist -d $dev -o -G -K $host_key -S 0";
+	    $cmd = "sg_persist -d $dev -o -G -K $host_key -S 0";
 	}
 	else
 	{
-	    my $cmd = "sg_persist -d $dev -o -A -K $host_key -S $node_key -T 5";
+	    $cmd = "sg_persist -d $dev -o -A -K $host_key -S $node_key -T 5";
 	}
 
 	my $pid = open3($in, $out, $err, $cmd) or die "$!\n";
 
 	waitpid($pid, 0);
 
-	die "Unable to execute sg_persist.\n" if ($?>>8);
-
 	if ($opt_v)
 	{
 	    print "$cmd\n";
@@ -185,6 +184,8 @@
 	    }
 	}
 
+	die "Unable to execute sg_persist.\n" if ($?>>8);
+
 	close($in);
 	close($out);
 	close($err);



             reply	other threads:[~2006-06-29 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29 20:36 rohara [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-29 22:16 [Cluster-devel] cluster/fence/agents/scsi fence_scsi jparsons
2006-06-29 17:23 rohara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060629203612.12324.qmail@sourceware.org \
    --to=rohara@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).