Skip to content
  • David Johnson's avatar
    Force systemd-networkd to wait for udev to really finish processing. · 564f821e
    David Johnson authored
    Sometimes there seemed to be a race where systemd-networkd would start
    trying to find .network config files before the emulab control net udev
    rules (the shell script the rule launches, rather) could actually write
    them.  This race would sometimes manifest, but mostly not.
    
    By default, systemd-networkd does not wait for udev to finish
    processing its device events.  This seems odd, but I guess it is not
    expecting dynamic configuration in /run/systemd/network like we use
    (although its docs explicitly allow for this case).  Oh well.  `udevadm
    settle` is supposed to indicate that udev is done processing all device
    events; but it must not mean that it is finished processing all the
    rules!  So not only do we wait for it to settle; we wait for the
    appearance of at least one .network file (that we wrote, hopefully) in
    /run/systemd/network .  No one else would ever write them there,
    clearly.
    564f821e