iPXE discussion forum

Full Version: Neat "if exists" method for iPXE Scripts...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Using initrd to function as an “if file exists” Boolean Determinor:
Code:
#!ipxe
set boot-path ${17}/Media-Depot/linux/VMware/4.1/ESX/HP/Z7550-00801
set config-path ${boot-path}/KickStart

initrd ${boot-path}/KickStart/${uuid}.cfg && goto stage2 || goto menu-option

:stage2
imgfree ${uuid}.cfg
echo Booting VMware ESX 4.1 Update 2 (OEM HP Z7550-00801)to Install to Local Disk for ${hostname}
initrd ${boot-path}/isolinux/initrd.img
chain ${boot-path}/isolinux/vmlinuz vmkopts=debugLogToSerial:1 mem=512M ks=${config-path}/${uuid}.cfg

:menu-option
chain ${17}/NetBoot/iPXE/ipxelinux.cfg/default/default.ipxe
That's a neat trick!
Reference URL's