Blame 0003-95iscsi-iscsiroot-unset-used-variables-before-starti.patch

Harald Hoyer 6adbc8
From 43f218522128b7864346bb11f7aad234410db745 Mon Sep 17 00:00:00 2001
Harald Hoyer 6adbc8
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 6adbc8
Date: Thu, 8 Dec 2011 15:04:04 +0100
Harald Hoyer 6adbc8
Subject: [PATCH] 95iscsi/iscsiroot: unset used variables before starting
Harald Hoyer 6adbc8
Harald Hoyer 6adbc8
If iscsiroot is called multiple times, then some variables can hold the
Harald Hoyer 6adbc8
values of a previous call, so unset all variables before using them.
Harald Hoyer 6adbc8
Harald Hoyer 6adbc8
https://bugzilla.redhat.com/show_bug.cgi?id=752066
Harald Hoyer 6adbc8
---
Harald Hoyer 6adbc8
 modules.d/95iscsi/iscsiroot |    5 +++++
Harald Hoyer 6adbc8
 1 files changed, 5 insertions(+), 0 deletions(-)
Harald Hoyer 6adbc8
Harald Hoyer 6adbc8
diff --git a/modules.d/95iscsi/iscsiroot b/modules.d/95iscsi/iscsiroot
Harald Hoyer 6adbc8
index bcdc046..e7bac74 100755
Harald Hoyer 6adbc8
--- a/modules.d/95iscsi/iscsiroot
Harald Hoyer 6adbc8
+++ b/modules.d/95iscsi/iscsiroot
Harald Hoyer 6adbc8
@@ -51,6 +51,11 @@ if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then
Harald Hoyer 6adbc8
     exit 0
Harald Hoyer 6adbc8
 fi
Harald Hoyer 6adbc8
 
Harald Hoyer 6adbc8
+unset iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port
Harald Hoyer 6adbc8
+unset iscsi_target_group iscsi_protocol iscsirw iscsi_lun
Harald Hoyer 6adbc8
+unset iscsi_username iscsi_password 
Harald Hoyer 6adbc8
+unset iscsi_in_username iscsi_in_password
Harald Hoyer 6adbc8
+
Harald Hoyer 6adbc8
 # override conf settings by command line options
Harald Hoyer 6adbc8
 arg=$(getargs rd.iscsi.initiator iscsi_initiator=)
Harald Hoyer 6adbc8
 [ -n "$arg" ] && iscsi_initiator=$arg