Infinite wait for network at boot doesn't work

I selected the infinite wait for network at boot in dietpi-config. However, my raspberry pi boots up without a network connection until I powercycle it. I have updated my diet and I am on the latest version.
How do I resolve this?

Hi,

Thanks for report.

Unable to replicate on RPi 3 with eth unplugged and WiFi disabled.

Is eth plugged in on your system? WiFi disabled ?

The command we use to check a valid connection is:

route | awk '{print $4}' | grep -ci -m1 'UG'

UG means UP and valid GATEWAY: http://www.thegeekstuff.com/2012/05/route-flags/?utm

Maybe the command is giving bad results, any chance you could replicate no connection boot and paste results of:

route

Not sure how to go about that since it is a headless server and I need it connected to run the route command.

Is there any script I can use to check for internet connection at boot and reboot if there is no connection?

I’ve got a question about this, is this simply waiting to be assigned an IP address from a router? If the router doesn’t actually have an internet connection, will the device still continue with the boot?

Depends on router, however, If the router provides a gateway, it should pass the connection wait.

You can test with:

route | awk '{print $4}' | grep -ci -m1 'UG'

1 = gateway established, the net wait command would then exit, system resumed boot.
0 = gateway not available, DietPi will wait for the the above status, before continuing. Endless wait if boot_wait_for_network=2