File 0014-Add-shell-header-when-dumping-configuration.patch of Package lio-utils

From 3601de1f68eee23616932079c151700b32edd1a8 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 1 Feb 2013 13:07:55 +0100
Subject: Add shell header when dumping configuration

The configuration is actually a shell script, so we should
be printing out a proper header.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 lio-py/lio_dump.py | 3 +++
 tcm-py/tcm_dump.py | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lio-py/lio_dump.py b/lio-py/lio_dump.py
index 3e3461f..2a88f3a 100755
--- a/lio-py/lio_dump.py
+++ b/lio-py/lio_dump.py
@@ -16,6 +16,9 @@ def lio_target_configfs_dump(option, opt_str, value, parser):
 
 	iqn_root = os.listdir(lio_root)
 
+	# Add proper shell header
+	print "#!/bin/bash"
+
 	# This will load up iscsi_target_mod.ko
 	print "mkdir " + lio_root
 
diff --git a/tcm-py/tcm_dump.py b/tcm-py/tcm_dump.py
index 3963b51..e4a99e6 100755
--- a/tcm-py/tcm_dump.py
+++ b/tcm-py/tcm_dump.py
@@ -28,7 +28,8 @@ def tcm_dump_configfs(option, opt_str, value, parser):
 		print "Unable to access tcm_root: " + tcm_root
 		sys.exit(1)
 
-	print "modprobe target_core_mod"
+	# Add proper shell header
+	print "#!/bin/bash"
 
 	# Loop through ALUA Logical Unit Groups
 	# Note that the 'default_lu_gp' is automatically created when
-- 
1.8.1.4