Fix: syntax #8

Merged
PeterSurda merged 1 commits from PeterSurda/ipxe_scripts:mac_1 into master 2021-04-30 11:18:03 +02:00

View File

@ -34,13 +34,12 @@ isset ${net${idx}/mac} || goto loop_done
######################## SET STATIC IP INFO HERE #############################
# Just copy/paste an entire line to add more
iseq ${net${idx}/mac:string} "00:01:02:A0:B1:C1" && set ip-dev-name eth0 && set ip-addr "192.168.1.5" && set ip-gateway "192.168.1.1" && set ip-netmask "255.255.255.0" && set ip-dns "1.1.1.1" && set successful t && goto loop_done ||
iseq ${net${idx}/mac:string} "03:04:05:D4:E5:F6" && set ip-dev-name eth0 && set ip-addr "192.168.99.2" && set ip-gateway "192.168.99.1" && set ip-netmask "255.255.255.0" && set ip-dns "1.1.1.1" && set successful t && goto loop_done ||
#
echo Checking net${idx}
# node1.bitmessage.at
iseq ${net${idx}/mac:string} "40:a8:f0:31:cc:58" && set ip-dev-name eth0 && set ip-addr "93.189.28.82" && set ip-gateway "93.189.28.81" && set ip-netmask "255.255.255.240" && set ip-dns "1.1.1.1" && set successful t && goto loop_done ||
iseq ${net${idx}/mac:string} "40:a8:f0:31:cc:59" && set ip-dev-name eth0 && set ip-addr "93.189.28.82" && set ip-gateway "93.189.28.81" && set ip-netmask "255.255.255.240" && set ip-dns "1.1.1.1" && set successful t && goto loop_done ||
iseq ${net${idx}/mac} 40:a8:f0:31:cc:58 && set ip-dev-name eth0 && set ip-addr 93.189.28.82 && set ip-gateway 93.189.28.81 && set ip-netmask 255.255.255.24 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
iseq ${net${idx}/mac} 40:a8:f0:31:cc:59 && set ip-dev-name eth0 && set ip-addr 93.189.28.82 && set ip-gateway 93.189.28.81 && set ip-netmask 255.255.255.240 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
##############################################################################
inc idx && goto loop
@ -48,7 +47,7 @@ inc idx && goto loop
:loop_done
# If we have not successfully found a MAC match, then we error, because we
# also failed DHCP. So there's nothing we can do but fail.
iseq successful f && goto error_handler
iseq ${successful} f && goto error_handler ||
# If on the other hand we're successful, then we construct the kernel ip= line
set ip-info ${ip-addr}::${ip-gateway}:${ip-netmask}::${ip-dev-name}:off:${ip-dns}