[PATCH 3/3] tgt-admin: merge duplicate blocks in targets.conf

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

 



See https://bugzilla.redhat.com/show_bug.cgi?id=681499

If there are duplicate blocks in targets.conf, this can cause issues.
These should be merged.

Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>
---
 scripts/tgt-admin |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/tgt-admin b/scripts/tgt-admin
index 2c69e8b..2ffa8cf 100755
--- a/scripts/tgt-admin
+++ b/scripts/tgt-admin
@@ -162,7 +162,7 @@ sub parse_configs {
 		# Check if alternative configuration file exists
 		if (-e "$alternate_conf") {
 			execute("# Using $alternate_conf as configuration file\n");
-			%conf = ParseConfig(-ConfigFile => "$alternate_conf", -UseApacheInclude => 1, -IncludeGlob => 1,);
+			%conf = ParseConfig(-ConfigFile => "$alternate_conf", -UseApacheInclude => 1, -IncludeGlob => 1, -MergeDuplicateBlocks => 1);
 		}
 		else {
 			die("Config file $alternate_conf not found. Exiting...\n");
@@ -170,7 +170,7 @@ sub parse_configs {
 	} else {
 		# Parse the config file with Config::General
 		if (-e "$configfile") {
-			%conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -IncludeGlob => 1,);
+			%conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -IncludeGlob => 1, -MergeDuplicateBlocks => 1);
 		} else {
 			die("Config file $configfile not found. Exiting...\n");
 		}
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux