Skip to content

Commit

Permalink
Merge pull request #94 from opoplawski/inst
Browse files Browse the repository at this point in the history
Add inst. prefix to kickstart kernel options
  • Loading branch information
SchoolGuy committed Aug 14, 2023
2 parents 7569934 + 856a1a5 commit 87fc322
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions koan/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,12 @@ def calc_kernel_args(self, pd, replace_self=0):
elif breed is not None and breed == "debian" or breed == "ubuntu":
kextra = "auto-install/enable=true priority=critical url=" + autoinst
else:
kextra = "ks=" + autoinst
if (os_version[0:4] == "rhel" and int(os_version[4:]) <= 6) or (
os_version[0:6] == "fedora" and int(os_version[6:]) <= 16
):
kextra = "ks=" + autoinst
else:
kextra = "inst.ks=" + autoinst

if options != "":
kextra = kextra + " " + options
Expand Down Expand Up @@ -1541,7 +1546,12 @@ def calc_kernel_args(self, pd, replace_self=0):
if breed == "suse":
hashv["netdevice"] = self.static_interface
else:
hashv["ksdevice"] = self.static_interface
if (os_version[0:4] == "rhel" and int(os_version[4:]) <= 6) or (
os_version[0:6] == "fedora" and int(os_version[6:]) <= 16
):
hashv["ksdevice"] = self.static_interface
else:
hashv["inst.ksdevice"] = self.static_interface
newdracut = False
if breed == "redhat" and (
(os_version[0:4] == "rhel" and int(os_version[4:]) >= 7)
Expand Down Expand Up @@ -1598,7 +1608,12 @@ def get_cidr(netmask):
hashv["dns"] = ",".join(dns)

if replace_self and self.embed_autoinst:
hashv["ks"] = "file:ks.cfg"
if (os_version[0:4] == "rhel" and int(os_version[4:]) <= 6) or (
os_version[0:6] == "fedora" and int(os_version[6:]) <= 16
):
hashv["ks"] = "file:ks.cfg"
else:
hashv["inst.ks"] = "file:ks.cfg"

if self.kopts_override is not None:
hash2 = utils.input_string_or_dict(self.kopts_override)
Expand Down

0 comments on commit 87fc322

Please sign in to comment.