Sha256: 688d956d434bfa8523057dec1ce129235c2661c255fb8978aadf69f9fb7d57cb

Contents?: true

Size: 829 Bytes

Versions: 11

Compression:

Stored size: 829 Bytes

Contents

#!ipxe
# Example foreman_bootdisk generic host template
#
# This template is generic, but it will chainload to Foreman so expects the
# host to be registered already.
#
# It loops through all interfaces using DHCP, requesting a template from
# Foreman in the hope that one of the MACs or IPs matches.
#
# Copy this template to customize it, the original is read-only.

echo Foreman Bootdisk: Generic image

# loop over net* until we can get a template
<% url = bootdisk_chain_url %>
<% (0..32).each do |i| -%>
:net<%= i %>
isset ${net<%= i -%>/mac} || goto no_nic
echo net<%= i -%> is a ${net<%= i -%>/chip} with MAC ${net<%= i -%>/mac}
dhcp net<%= i %> || goto net<%= i+1 %>
chain <%= url %>${net<%= i -%>/mac} || goto net<%= i+1 %>
exit 0
<% end -%>

:no_nic
echo Failed to chainload from any network interface
sleep 30
exit 1

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_bootdisk-12.0.1 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-12.0.0 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-11.0.0 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-10.0.2 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-10.0.1 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-10.0.0 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-9.0.0 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-8.1.0 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-8.0.2 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-8.0.1 app/views/foreman_bootdisk/generic_host.erb
foreman_bootdisk-7.0.1 app/views/foreman_bootdisk/generic_host.erb