Skip to content

Commit

Permalink
Merge pull request #1145 from vojtechtrefny/3.8-devel_iscsi-set-firmw…
Browse files Browse the repository at this point in the history
…are-initiator

iscsi: Save firmware initiator name to /etc/iscsi/initiatorname.iscsi
  • Loading branch information
vojtechtrefny committed Jul 19, 2023
2 parents 1428b2e + 4d2618f commit 5eac14a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blivet/iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ def __init__(self):
self._initiator = initiatorname
except Exception as e: # pylint: disable=broad-except
log.info("failed to get initiator name from iscsi firmware: %s", str(e))
else:
# write the firmware initiator to /etc/iscsi/initiatorname.iscsi
log.info("Setting up firmware iSCSI initiator name %s", self.initiator)
args = GLib.Variant("(sa{sv})", (initiatorname, None))
self._call_initiator_method("SetInitiatorName", args)

# So that users can write iscsi() to get the singleton instance
def __call__(self):
Expand Down

0 comments on commit 5eac14a

Please sign in to comment.