Fix: syntax

- string checking incorrect
- "else" missing in static ip check
This commit is contained in:
Peter Šurda 2021-04-30 11:16:48 +02:00
parent e79ea2eaa2
commit 892e6f060d
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 5 additions and 6 deletions

View File

@ -34,13 +34,12 @@ isset ${net${idx}/mac} || goto loop_done
######################## SET STATIC IP INFO HERE ############################# ######################## SET STATIC IP INFO HERE #############################
# Just copy/paste an entire line to add more # 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 || echo Checking net${idx}
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 ||
# node1.bitmessage.at # 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} 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: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: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 inc idx && goto loop
@ -48,7 +47,7 @@ inc idx && goto loop
:loop_done :loop_done
# If we have not successfully found a MAC match, then we error, because we # 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. # 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 # 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} set ip-info ${ip-addr}::${ip-gateway}:${ip-netmask}::${ip-dev-name}:off:${ip-dns}