summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-07-31 15:40:43 +0200
committerHans de Goede <hdegoede@redhat.com>2009-08-04 10:56:32 +0200
commitd3b393f377df675b3ce2bf3f2700b639e3cfcafc (patch)
treebe2faf197b4d64040bb55debb5d937d7eaf5e6e3 /storage
parentada34f6073bc907e689399a494cf8886a246b12a (diff)
downloadanaconda-d3b393f377df675b3ce2bf3f2700b639e3cfcafc.tar.gz
anaconda-d3b393f377df675b3ce2bf3f2700b639e3cfcafc.tar.xz
anaconda-d3b393f377df675b3ce2bf3f2700b639e3cfcafc.zip
Only set iscsi nodes to autostart when none of the LUN's contain /
One iscsi target / node can have multiple LUN's currently we would then set it to autostart if any of the LUN's was not used for /, the correct thing todo is to only set it to autostart if none of the LUN's are used for /
Diffstat (limited to 'storage')
-rw-r--r--storage/iscsi.py17
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"):