set default="0"
set timeout=-1

if loadfont unicode ; then
  set gfxmode=auto
  set locale_dir=$prefix/locale
  set lang=en_US
fi
# terminal_output gfxterm

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi

{% for machine in pxe.machines %}
menuentry "Autoinstall {{os_name}} for {{machine.hostname}}" --id=autoinstall-{{machine.hostname}} {
    echo "Loading Kernel /{{kernel_filename}}..."
    # Make sure to escape the ';'
    linux /{{kernel_filename}} ip=dhcp install auto=true priority=critical netcfg/get_hostname={{machine.hostname}} url=http://{{pxe.http.get_address()}}/{{legacy_preseed_auto_dir}}/{{machine.hostname}} live-installer/net-image=http://{{pxe.http.get_address()}}/{{net_image_http_path}}
    echo "Loading Ram Disk /{{initrd_filename}}..."
    initrd /{{initrd_filename}}
}
{% endfor %}

# The answers you give to this custom installer will end up
# being logged at /var/log/installer/syslog in the final install
menuentry "Custom install {{os_name}}" --id=manual-install {
    echo "Loading Kernel /{{kernel_filename}}..."
    linux /{{kernel_filename}} DEBCONF_DEBUG=5 ip=dhcp install auto=true priority=critical url=http://{{pxe.http.get_address()}}/{{legacy_preseed_manual_path}} live-installer/net-image=http://{{pxe.http.get_address()}}/{{net_image_http_path}}
    echo "Loading Ram Disk /{{initrd_filename}}..."
    initrd /{{initrd_filename}}
}
