diff options
-rw-r--r-- | storage/iscsi.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/storage/iscsi.py b/storage/iscsi.py index 13ddc082e..51b0eb899 100644 --- a/storage/iscsi.py +++ b/storage/iscsi.py @@ -261,16 +261,17 @@ class iscsi(object): if not flags.test: root = anaconda.id.storage.fsset.rootDevice - disks = anaconda.id.storage.devicetree.getDevicesByType("iscsi") # set iscsi nodes to autostart - for disk in disks: - # devices used for root get started by the initrd - if root.dependsOn(disk): - continue - - node = self.getNode(disk.iscsi_name, disk.iscsi_address, disk.iscsi_port) - if node: + for node in self.nodes: + autostart = True + disks = self.getNodeDisks(node, anaconda.id.storage) + for disk in disks: + # nodes used for root get started by the initrd + if root.dependsOn(disk): + autostart = False + + if autostart: node.setParameter("node.startup", "automatic") if not os.path.isdir(instPath + "/etc/iscsi"): |