Skip to content

Commit

Permalink
added autoyast=... parameter to the ISO building code when breed=suse
Browse files Browse the repository at this point in the history
  • Loading branch information
ugansert committed Jun 9, 2011
1 parent 48fed96 commit 7a0d074
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions cobbler/action_buildiso.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def sort_name(a,b):
append_line = " append initrd=%s.img" % distname
if dist.breed == "suse":
append_line = append_line + " autoyast=%s " % data["kickstart"]
else:
if dist.breed == "redhat":
append_line = append_line + " ks=%s " % data["kickstart"]
append_line = append_line + " %s\n" % data["kernel_options"]

Expand Down Expand Up @@ -218,7 +218,10 @@ def sort_name(a,b):
)

append_line = " append initrd=%s.img" % distname
append_line = append_line + " ks=%s" % data["kickstart"]
if dist.breed == "suse":
append_line = append_line + " autoyast=%s" % data["kickstart"]
if dist.breed == "redhat":
append_line = append_line + " ks=%s" % data["kickstart"]
append_line = append_line + " %s" % data["kernel_options"]

# add network info to avoid DHCP only if it is available
Expand Down Expand Up @@ -249,7 +252,11 @@ def sort_name(a,b):


if data.has_key("ip_address_" + primary_interface) and data["ip_address_" + primary_interface] != "":
append_line = append_line + " ip=%s" % data["ip_address_" + primary_interface]
if dist.breed == "suse":
append_line = append_line + " hostip=%s" % data["ip_address_" + primary_interface]
else:
append_line = append_line + " ip=%s" % data["ip_address_" + primary_interface]


if data.has_key("subnet_" + primary_interface) and data["subnet_" + primary_interface] != "":
append_line = append_line + " netmask=%s" % data["subnet_" + primary_interface]
Expand All @@ -258,7 +265,10 @@ def sort_name(a,b):
append_line = append_line + " gateway=%s" % data["gateway"]

if not exclude_dns and data.has_key("name_servers") and data["name_servers"]:
append_line = append_line + " dns=%s\n" % ",".join(data["name_servers"])
if dist.breed == "suse":
append_line = append_line + " nameserver=%s\n" % data["name_servers"][0]
else:
append_line = append_line + " dns=%s\n" % ",".join(data["name_servers"])

length=len(append_line)
if length > 254:
Expand Down

0 comments on commit 7a0d074

Please sign in to comment.