浏览代码

Merge pull request #34 from netbootxyz/customboot

add bootstrapping by mac address or hostname
Antony Messerli 5 年之前
父节点
当前提交
a826b44423
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      roles/netbootxyz/templates/disks/netboot.xyz.j2

+ 2 - 0
roles/netbootxyz/templates/disks/netboot.xyz.j2

@@ -50,6 +50,8 @@ echo Attempting chainload of ${boot_domain}...
 goto menu || goto failsafe
 
 :tftpmenu
+isset ${hostname} && chain --autofree tftp://${next-server}/HOSTNAME-${hostname}.ipxe || echo Custom boot by Hostname not found trying MAC...
+chain --autofree tftp://${next-server}/MAC-${mac:hexraw}.ipxe || echo Custom boot by MAC not found booting default...
 chain --autofree tftp://${next-server}/menu.ipxe || echo ${TFTP_ERR} && goto menu
 
 :menu