diff options
author | Jeremy Katz <katzj@redhat.com> | 2006-06-21 04:00:44 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2006-06-21 04:00:44 +0000 |
commit | 62255d5b2aa3f924007eb7173db944b6bd0f7459 (patch) | |
tree | 8f9d76c04236e7eb4a678039c3502abe7c8e95cb /isys | |
parent | 58b0dbfc664c3bdfec3bf300f58c94ca9e86aca0 (diff) | |
download | anaconda-62255d5b2aa3f924007eb7173db944b6bd0f7459.tar.gz anaconda-62255d5b2aa3f924007eb7173db944b6bd0f7459.tar.xz anaconda-62255d5b2aa3f924007eb7173db944b6bd0f7459.zip |
2006-06-21 Jeremy Katz <katzj@redhat.com>
* iw/iscsi_gui.py (iscsiWindow.getNext): Don't need to do the
startup here now.
* isys/isys.py (compareDrives): Sort xvd devices first since
they're the "bootable" ones for Xen
(driveIsIscsi): Determine if a drive is iscsi or not. Kind of ugly.
* zfcp.py (ZFCP.write): Copy zfcp.conf here.
* yuminstall.py (YumBackend.doPreInstall): Write out network, zfcp
and iscsi info prior to the install starting.
* partitioning.py (partitionObjectsInitialize): Flush drive dict
on initialization, set up iscsi devices here, make device nodes
for drives
* kickstart.py (AnacondaKSHandlers.doIscsi): Initial iscsi
kickstart support. This syntax *will* change
* iscsi.py (iscsi.action): Set nodes to start up automatically on
boot in the db
(iscsi.startup): Give a popup while we're waiting on iscsi devs
to initialize
(iscsi.write): Write out iscsi config
* fsset.py: Add various bits so that we can set that a device
should be marked as _netdev in the fstab and use it appropriately
for iscsi.
Diffstat (limited to 'isys')
-rw-r--r-- | isys/isys.py | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/isys/isys.py b/isys/isys.py index 166f3fd27..9ec1cba04 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -26,6 +26,7 @@ import kudzu import iutil import warnings import resource +import re import rhpl import struct @@ -465,9 +466,6 @@ for d in range(80, 80 + 15): biosdisks[disk] = d def compareDrives(first, second): - type1 = first[0:2] - type2 = second[0:2] - if biosdisks.has_key(first) and biosdisks.has_key(second): one = biosdisks[first] two = biosdisks[second] @@ -476,17 +474,21 @@ def compareDrives(first, second): elif (one > two): return 1 - if type1 == "hd": - type1 = 0 - elif type1 == "sd": - type1 = 1 + if first.startswith("hd"): + type1 = 0 + elif first.startswith("sd"): + type1 = 1 + elif first.startswith("xvd"): + type1 = -1 else: - type1 = 2 + type1 = 2 - if type2 == "hd": - type2 = 0 - elif type2 == "sd": + if second.startswith("hd"): + type2 = 0 + elif second.startswith("sd"): type2 = 1 + elif second.startswith("xvd"): + type2 = -1 else: type2 = 2 @@ -789,6 +791,15 @@ def driveIsRemovable(device): return False +def driveIsIscsi(device): + # ewww. just ewww. + if not os.path.islink("/sys/block/%s/device" %(device,)): + return False + target = os.readlink("/sys/block/%s/device" %(device,)) + if re.search("/platform/host[0-9]*/session[0-9]*/target[0-9]*:[0-9]*:[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*", target) is not None: + return True + return False + def vtActivate (num): _isys.vtActivate (num) |