Originally this fix is related to #500273. Related: rhbz#811426 --- storage/iscsi.py | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/storage/iscsi.py b/storage/iscsi.py index 122590b..51f9c68 100644 --- a/storage/iscsi.py +++ b/storage/iscsi.py @@ -405,23 +405,30 @@ class iscsi(object): self.stabilize(intf) def writeKS(self, f): + if not self.initiatorSet: return - f.write("iscsiname %s\n" %(self.initiator,)) + + nodes = "" for n in self.active_nodes(): - f.write("iscsi --ipaddr %s --port %s --target %s" % - (n.address, n.port, n.name)) + if n in self.ibftNodes: + continue + nodes += "iscsi --ipaddr %s --port %s --target %s" % (n.address, n.port, n.name) if n.iface != "default": - f.write(" --iface %s" % self.ifaces[n.iface]) + nodes += " --iface %s" % self.ifaces[n.iface] auth = n.getAuth() if auth: - f.write(" --user %s" % auth.username) - f.write(" --password %s" % auth.password) + nodes += " --user %s" % auth.username + nodes += " --password %s" % auth.password if len(auth.reverse_username): - f.write(" --reverse-user %s" % auth.reverse_username) + nodes += " --reverse-user %s" % auth.reverse_username if len(auth.reverse_password): - f.write(" --reverse-password %s" % auth.reverse_password) - f.write("\n") + nodes += " --reverse-password %s" % auth.reverse_password + nodes += "\n" + + if nodes: + f.write("iscsiname %s\n" %(self.initiator,)) + f.write("%s" % nodes) def write(self, instPath, anaconda): if not self.initiatorSet: -- 1.7.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list