• Scott Moser's avatar
    improve how cloud-init-wait waits · 78c9de87
    Scott Moser authored
    Instead of sleep and check loop, use 'udevadm settle' to wait.
    since we run from a udev event, this is sufficient.
    udev settle will exit when either of
       a.) the file exists
       b.) the udev event queue has all been processed.
       c.) timeout is reached.
    
    Since cloud-init-wait is being run as a udev event, 'b' cannot
    be satisfied until it finishes. Thus, this essentially becomes a
    inotify based wait for the file /run/cloud-init/network-config-ready
    and no loops are needed.
    78c9de87
Name
Last commit
Last update
..
66-azure-ephemeral.rules Loading commit data...
79-cloud-init-net-wait.rules Loading commit data...
cloud-init-wait Loading commit data...