Project

General

Profile

« Previous | Next » 

Revision 6166c802

Added by Ohad Levy over 12 years ago

  • ID 6166c80262c4d7d1ab4c3832713bb02d0cf59d7f

fixes #1063 - can't deploy default pxe menu

View differences:

app/models/operatingsystem.rb
class Jail < Safemode::Jail
allow :name, :media_url, :major, :minor, :family, :to_s, :epel, :==, :release_name, :kernel, :initrd
allow :name, :media_url, :major, :minor, :family, :to_s, :epel, :==, :release_name, :kernel, :initrd, :pxe_type
end
# As Rails loads an object it casts it to the class in the 'type' field. If we ensure that the type and
app/views/unattended/pxe_default.erb
<% for profile in @profiles -%>
LABEL <%= "#{profile[:template]} - #{profile[:hostgroup]}" %>
kernel <%= profile[:hostgroup].operatingsystem.kernel(profile[:hostgroup].architecture) %>
<% if profile[:hostgroup].operatingsystem.is_a?(Redhat) -%>
<% case profile[:hostgroup].operatingsystem.pxe_type -%>
<% when "kickstart" -%>
append initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> ks=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ksdevice=bootif network kssendmac
<% else -%>
<% when "preseed" -%>
append initrd=<%= profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture) %> interface=auto url=<%= default_template_url(profile[:template], profile[:hostgroup]) %> ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=unassigned-hostname locale=en_US console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA
<% end -%>
<% end -%>
<% end -%>

Also available in: Unified diff