diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-06-15 15:23:06 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-07-11 14:50:00 +1000 |
commit | 58db060fbb1548a0acdfc475fa41fe86fb32dd11 (patch) | |
tree | bf23d028b13d7f5d9f694d2e2455fc8a9a2f64e6 /discover/paths.h | |
parent | 515d2f03bae8d5617ee3bce5a46287203f7215c2 (diff) | |
download | petitboot-58db060fbb1548a0acdfc475fa41fe86fb32dd11.zip petitboot-58db060fbb1548a0acdfc475fa41fe86fb32dd11.tar.gz |
discover: Wait for net interfaces to be marked ready
If pb-discover is started before udev has settled there is a race
between Petitboot configuring interfaces and udev renaming them. If an
interface is set "up" the name change will fail and interfaces can be
inconsistently named, eg:
Device: (*) eth0 [0c:c4:7a:f4:1c:50, link up]
( ) enP1p9s0f1 [0c:c4:7a:f4:1c:51, link down]
( ) enP1p9s0f2 [0c:c4:7a:f4:1c:52, link down]
( ) enP1p9s0f3 [0c:c4:7a:f4:1c:53, link down]
Add "net" devices to the udev filter and wait for them to be announced
by udev before configuring them.
udev_enumerate_add_match_is_initialized() ensures that by the time an
interface appears via udev its name will be consistent.
This also swaps the network and udev init order, but since interfaces
now will not be configured until after udev is ready this should not
have a user-visible effect.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/paths.h')
0 files changed, 0 insertions, 0 deletions