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 /iscsi.py | |
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 'iscsi.py')
-rw-r--r-- | iscsi.py | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -17,8 +17,11 @@ import signal import iutil from flags import flags import logging +import shutil log = logging.getLogger("anaconda") +from rhpl.translate import _, N_ + # Note that stage2 copies all files under /sbin to /usr/sbin ISCSID="iscsid" @@ -59,6 +62,13 @@ class iscsi: stdout = "/dev/tty5", stderr = "/dev/tty5") + # ... and now we have to make it start automatically + argv = [ ISCSIADM, "-m", "node", "-r", "%s" %(recnum,), + "-o", "update", "-n", "node.startup", + "-v", "automatic" ] + iutil.execWithRedirect(argv[0], argv, searchPath = 1, + stdout = "/dev/tty5", + stderr = "/dev/tty5") def shutdown(self): if not self.iscsidStarted: @@ -78,7 +88,7 @@ class iscsi: self.iscsidStarted = False; - def startup(self): + def startup(self, intf = None): log.info("iSCSI IP address %s, port %s" % (self.ipaddr, self.port)) log.info("iSCSI initiator name %s", self.initiator) @@ -91,6 +101,10 @@ class iscsi: log.info("iSCSI: Not starting, no iscsi IP address specified") return + if intf: + w = intf.waitWindow(_("Initializing iSCSI initiator"), + _("Initializing iSCSI initiator")) + log.debug("Setting up %s" % (INITIATOR_FILE, )) if os.path.exists(INITIATOR_FILE): os.unlink(INITIATOR_FILE) @@ -112,6 +126,9 @@ class iscsi: self.action("--login") self.iscsidStarted = True + if intf: + w.pop() + def writeKS(self): # XXX Useful if we have auto-generated kickstart files. return @@ -121,8 +138,8 @@ class iscsi: os.write(fd, "InitiatorName=%s\n" %(self.initiator)) os.close(fd) - if not os.path.isdir(instPath + "/var/db/iscsi"): - iutil.mkdirChain(instPath + "/var/db/iscsi") + if not os.path.isdir(instPath + "/var/db"): + iutil.mkdirChain(instPath + "/var/db") shutil.copytree("/var/db/iscsi", instPath + "/var/db/iscsi") # vim:tw=78:ts=4:et:sw=4 |