SVN-Update: Error in creating dhcpd.conf
-
Confirmed, found, here is the fix:
diff --git a/lib/common/functions.sh b/lib/common/functions.sh index 5b3431d..15640c5 100755 --- a/lib/common/functions.sh +++ b/lib/common/functions.sh @@ -1834,8 +1834,8 @@ configureDHCP() { echo " max-lease-time 43200;" >> "$dhcptouse" [[ ! $(validip $routeraddress) -eq 0 ]] && routeraddress=$(echo $routeraddress | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") [[ ! $(validip $dnsaddress) -eq 0 ]] && dnsaddress=$(echo $dnsaddress | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") - [[ $(validip $routeraddress) -eq 0 ]] && echo " option routers $routeraddress;" >> "$dhcptouse" || echo " #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No router address found !!!" - [[ $(validip $dnsaddress) -eq 0 ]] && echo " option domain-name-servers $dnsaddress;" >> "$dhcptouse" || echo " #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No dns address found !!!" + [[ $(validip $routeraddress) -eq 0 ]] && echo " option routers $routeraddress;" >> "$dhcptouse" || ( echo " #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No router address found !!!" ) + [[ $(validip $dnsaddress) -eq 0 ]] && echo " option domain-name-servers $dnsaddress;" >> "$dhcptouse" || ( echo " #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No dns address found !!!" ) echo " class \"Legacy\" {" >> "$dhcptouse" echo " match if substring(option vendor-class-identifier, 0, 20) = \"PXEClient:Arch:00000\";" >> "$dhcptouse" echo " filename \"undionly.kkpxe\";" >> "$dhcptouse"
Sorry @Tom-Elliott for just posting this here but I don’t think this is worth a pull request…
-
@Sebastian-Roth That’s fine, but it doesn’t appear to have all the data.
-
Yeah, just noticed…updated my post. Essentially it’s just some brackets missing to make the logic work like it should
[[ ...]] && ... || ( ... && ...)
-
@Sebastian-Roth Added to the code and pushed.
-
@Oleg Can you please update and try again since there has been another fix to this? Ideally, you should no longer get the warnings.
-
Perfect now! Installer and configs are all correct. From my side the problem is solved. Thanks!