On Fri, Nov 01, 2019 at 09:50:17AM +0500, Alexander E. Patrakov wrote: > I was trying to configure a service that needs networking to be completely > configured when it starts, with addresses and the default route. To achieve > that, I made it depend on network-online.target, and enabled > ifupdown-wait-online.service. However, after the reboot, the service was > still started before dhclient assigned the IP address to the interface. [...] > Nov 01 09:14:06 dhclient[405]: DHCPDISCOVER on enp0s3 to 255.255.255.255 port > 67 interval 7 > Nov 01 09:14:07 wait-online.sh[234]: + up=true > Nov 01 09:14:07 wait-online.sh[234]: + /sbin/ifquery --state enp0s3 > Nov 01 09:14:07 wait-online.sh[234]: + [ true = true ] > Nov 01 09:14:07 wait-online.sh[234]: + break > Nov 01 09:14:07 wait-online.sh[234]: + [ true = true ] > Nov 01 09:14:07 wait-online.sh[234]: + /sbin/ifquery --state > Nov 01 09:14:07 wait-online.sh[234]: enp0s3=enp0s3 > Nov 01 09:14:07 wait-online.sh[234]: lo=lo > Nov 01 09:14:07 systemd[1]: Started Wait for network to be configured by > ifupdown.
Indeed, that sounds like a bug. It should have waited for ifup to finish bringing the interface up. As a workaround, you can tell wait-online.sh to wait for a route to a given address to become available. Edit /etc/default/networking, set WAIT_ONLINE_METHOD to route, and WAIT_ONLINE_ADDRESS to the address you want to wait for to become reachable. -- Met vriendelijke groet / with kind regards, Guus Sliepen <g...@debian.org>
signature.asc
Description: PGP signature