]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95iscsi/iscsiroot: unset used variables before starting
authorHarald Hoyer <harald@redhat.com>
Thu, 8 Dec 2011 14:04:04 +0000 (15:04 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 15 Dec 2011 13:49:04 +0000 (14:49 +0100)
If iscsiroot is called multiple times, then some variables can hold the
values of a previous call, so unset all variables before using them.

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

modules.d/95iscsi/iscsiroot

index bcdc0460fe5de5cc0afc2c59f0dba98056e611ce..e7bac74705b70576454e9463cb8441c74ebd41e8 100755 (executable)
@@ -51,6 +51,11 @@ if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then
     exit 0
 fi
 
+unset iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port
+unset iscsi_target_group iscsi_protocol iscsirw iscsi_lun
+unset iscsi_username iscsi_password 
+unset iscsi_in_username iscsi_in_password
+
 # override conf settings by command line options
 arg=$(getargs rd.iscsi.initiator iscsi_initiator=)
 [ -n "$arg" ] && iscsi_initiator=$arg