summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iscsi.py17
-rw-r--r--kickstart.py1
2 files changed, 10 insertions, 8 deletions
diff --git a/iscsi.py b/iscsi.py
index ce2c8b6dc..482e2c0ba 100644
--- a/iscsi.py
+++ b/iscsi.py
@@ -201,14 +201,6 @@ class iscsi(object):
if self.fwinfo and self.fwinfo.has_key("iface.initiatorname"):
self._initiator = self.fwinfo["iface.initiatorname"]
self.initiatorSet = True
- self.startup()
-
- # If there is a default drive in the iSCSI configuration, then
- # automatically attach to it. Do this before testing the initiator
- # name, because it is provided by the iBFT too
-
- if flags.ibft:
- self.loginToDefaultDrive()
def _getInitiator(self):
if self._initiator != "":
@@ -406,6 +398,15 @@ class iscsi(object):
# make a new target
self.addTarget(**values)
+
+ def startIBFT(self):
+ # If there is a default drive in the iSCSI configuration, then
+ # automatically attach to it. Do this before testing the initiator
+ # name, because it is provided by the iBFT too
+
+ if flags.ibft:
+ self.loginToDefaultDrive()
+
def startup(self, intf = None):
if not has_iscsi():
return
diff --git a/kickstart.py b/kickstart.py
index c872feb03..1a7fda5d7 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -281,6 +281,7 @@ class IscsiName(commands.iscsiname.FC6_IscsiName):
commands.iscsiname.FC6_IscsiName.parse(self, args)
self.handler.id.iscsi.initiator = self.iscsiname
+ self.handler.id.iscsi.startIBFT()
self.handler.id.iscsi.startup()
# FIXME: flush the drive dict so we figure drives out again
isys.flushDriveDict()