mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-24 07:51:03 +02:00
When retrievent the DHCP IP address (to get user data), two steps were used: the first one waited for one lease file to become present and the second one extracted and validated the server IP address. If for some reason the second step failed, an empty IP was provided (and notably, coreos-setup-environment.service never finishes correctly). To avoid that, we combine the two steps into a loop: for each available lease file, extract the IP and validate it. If it succeeds, return it. If not continue. If nothing was found, restart the same process after sleeping a bit.
Description
Languages
Shell
93%
Python
6.9%