summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-26 16:57:17 +0100
committerSimon Rettberg2019-03-26 16:57:17 +0100
commit0c9a27219ae440240ca13bd68cff896a5f7033d8 (patch)
tree8b515b14bc11e068dbfef0c766d7da4df25c363c
parent[CompileIPxeNew] Use kkkpxe for ipxelinux.0 symlink (diff)
downloadtmlite-bwlp-0c9a27219ae440240ca13bd68cff896a5f7033d8.tar.gz
tmlite-bwlp-0c9a27219ae440240ca13bd68cff896a5f7033d8.tar.xz
tmlite-bwlp-0c9a27219ae440240ca13bd68cff896a5f7033d8.zip
ipxe template: Fixes, more status output
-rw-r--r--data/ipxe-embed.template13
1 files changed, 10 insertions, 3 deletions
diff --git a/data/ipxe-embed.template b/data/ipxe-embed.template
index 16d63d7..2150ea6 100644
--- a/data/ipxe-embed.template
+++ b/data/ipxe-embed.template
@@ -17,11 +17,14 @@ set idx:int32 -1 ||
set retlbl:string next_open
:next_open
inc idx
-iseq 20 ${idx} && goto fail ||
+iseq 20 ${idx} && goto retry_sleep ||
+echo Now checking if net${idx} is open...
# No MAC -- done
-iseq ${net${idx}/mac} ${} && goto fail ||
+iseq ${net${idx}/mac} ${} && goto retry_sleep ||
+echo net${idx} has MACaddr ${net${idx}/mac}
# Has no IP -- ignore
iseq ${net${idx}/ip} ${} && goto cleaniface ||
+echo net${idx} has IPaddr ${net${idx}/ip}
ifopen net${idx} || goto cleaniface
# Success
set retlbl dochain
@@ -29,10 +32,12 @@ goto setvars
# Now try to chain to main script
:dochain
+echo Now chaining to main script
set self:string http://%ipaddress%/boot/ipxe?uuid=${uuid}&mac=${mac}&manuf=${manufacturer:uristring}&product=${product:uristring}&platform=${platform:uristring}&slx-extensions=${slxext}
chain -ar ${self} || goto fail
echo How the hell did I get here?
:fail
+echo Failed.
set retlbl retry_sleep
goto cleaniface
:retry_sleep
@@ -45,7 +50,8 @@ iseq 20 ${idx} && set idx:int32 -1 ||
set retlbl:string next_dhcp
:next_dhcp
inc idx
-iseq 20 ${idx} && goto fail ||
+iseq 20 ${idx} && goto retry_sleep ||
+echo Now trying dhcp on net${idx}
# No MAC -- done
iseq ${net${idx}/mac} ${} && goto next_dhcp ||
echo Trying net${idx} via DHCP
@@ -57,6 +63,7 @@ goto setvars
# Clear interface IP address and close it
# Jumps back to label stored in ${retlbl}
:cleaniface
+echo Cleaning Interface net${idx}
clear net${idx}/ip ||
clear net${idx}.dhcp/ip ||
ifclose net${idx} ||