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

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



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	rohara sourceware org	2006-11-29 20:50:22

Modified files:
	fence/agents/scsi: scsi_reserve 

Log message:
	Variable should be quoted in conditional statement.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_reserve.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2

--- cluster/fence/agents/scsi/scsi_reserve	2006/11/27 22:41:42	1.1.2.1
+++ cluster/fence/agents/scsi/scsi_reserve	2006/11/29 20:50:22	1.1.2.2
@@ -27,12 +27,12 @@
 
 # if no scsi devices were found we can exit now
 #
-[ -z $scsi_devices ] && exit 0
+[ -z "$scsi_devices" ] && exit 0
 
 # get the node name and node addr from cman
 #
-node_name=$( cman_tool status | grep "Node name" | awk -F": " '{print $2}' )
-node_addr=$( cman_tool status | grep "Node addr" | awk -F": " '{print $2}' )
+node_name=$( cman_tool status | grep "Node name" | awk -F": " '{ print $2 }' )
+node_addr=$( cman_tool status | grep "Node addr" | awk -F": " '{ print $2 }' )
 
 # create unique key for this host
 #
@@ -56,7 +56,6 @@
   for error in 1
   do
     sg_persist -d $dev -o -G -S $key &>/dev/null || break
-    # sg_persist -d $dev -o -R -K $key -T 5 &>/dev/null || break
     error=0
   done
 
@@ -69,7 +68,7 @@
 
   echo
 
-  # attempt to create a reservation
+  # create a reservation
   #
   sg_persist -d $dev -o -R -K $key -T 5 &>/dev/null
 
@@ -123,7 +122,7 @@
   fi
 done
 
-if [ -z $devices ]; then
+if [ -z "$devices" ]; then
     echo "No devices registered."
 else
     echo "Found ${#devices[ ]} registered device(s):"


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