File 0102-Add-additional-rc.target-run_fabric_cfs_ops-exclusio.patch of Package lio-utils

From 4bd008b1e1fd2510fbedce012c07b8c4b7a80502 Mon Sep 17 00:00:00 2001
From: root <root@aerith.risingtidesystems.com>
Date: Fri, 13 May 2011 11:04:44 -0700
Subject: Add additional rc.target:run_fabric_cfs_ops() exclusion cases

This patch adds the extra special exclusion cases in rc.target:
run_fabric_cfs_ops() for .rpmorig, .rpmnew, .dpkg-dist and
trailing /etc/target/fabric_start.sh~ cases to ensure these
are not executed during /etc/init.d/target start

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
(cherry picked from commit d2cf595d45895fcb0d1453aa74224d6edab244e5)
---
 scripts/rc.target | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/scripts/rc.target b/scripts/rc.target
index b464f32..22c0350 100644
--- a/scripts/rc.target
+++ b/scripts/rc.target
@@ -111,12 +111,24 @@ function run_fabric_cfs_ops() {
 		if [ $i == "lio_start.sh" ]; then
 			continue
 		fi
-
+		# Skip RPM package save+orig+new
 		if [[ $i =~ ".rpmsave" ]]; then
 			continue
 		fi
 
-		if [[ $i =~ ".dpkg-dist" ]]; then
+		if [[ $i =~ ".rpmorig" ]]; then
+			continue
+		fi
+
+		if [[ $i =~ ".rpmnew" ]]; then
+			continue
+		fi
+		# Skip dpkg dist
+                if [[ $i =~ ".dpkg-dist" ]]; then
+                        continue
+                fi
+		# Skip emacs state files
+		if [[ $i =~ ~$ ]]; then
 			continue
 		fi
 
@@ -138,7 +150,7 @@ function run_fabric_cfs_ops() {
 		else
 			echo "  [FAILED]"
 		fi
-		
+
 	done
 }
 
@@ -258,7 +270,7 @@ function load_tcm_mod() {
 }
 
 function shutdown_fabrics() {
-	
+
 	echo -n $"Unloading fabric/configfs: "
 	${TCM_FABRIC} --unloadall
 	RETVAL=$?
-- 
1.8.1.4