iPXE discussion forum
Neat "if exists" method for iPXE Scripts... - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Neat "if exists" method for iPXE Scripts... (/showthread.php?tid=6941)



Neat "if exists" method for iPXE Scripts... - MultimediaMan - 2013-06-05 03:06

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



RE: Neat "if exists" method for iPXE Scripts... - robinsmidsrod - 2013-06-05 09:34

That's a neat trick!