[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence/agents/scsi fence_scsi



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rohara 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]