Skip to content

Commit

Permalink
iscsi: Save firmware initiator name to /etc/iscsi/initiatorname.iscsi
Browse files Browse the repository at this point in the history
Resolves: rhbz#2084043
  • Loading branch information
vojtechtrefny committed Jul 19, 2023
1 parent 910139f commit f7b01a9
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 f7b01a9

Please sign in to comment.