Skip to content

Commit

Permalink
Generate new initiatorname from scratch (Fixes: #14)
Browse files Browse the repository at this point in the history
Since the el9 packages don't build an initiatorname by default, we
should not depend/use the file in factory anymore, but just generate the
string ourselves.

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
  • Loading branch information
dupondje committed Nov 23, 2022
1 parent 257837c commit e2dcdde
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/imgbased/plugins/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def _generate_iqn(self):
return
log.debug("Description=Generate a random iSCSI initiator IQN name")
suuid = str(uuid.uuid4()).split("-")[-1]
factory_f = File("/usr/share/factory/etc/iscsi/initiatorname.iscsi")
iqn = factory_f.contents.split(":")[0] + ":" + suuid + "\n"
iqn = "InitiatorName=iqn.1994-05.com.redhat:" + suuid + "\n"
File(initiator).write(iqn)

def _copy_files_to_boot(self):
Expand Down

0 comments on commit e2dcdde

Please # to comment.