networkd-wait-online: only consider interfaces given on the commandline
If some interfaces are given on the commandline, ignore all others.
This commit is contained in:
committed by
Daniel Mack
parent
79ac8ba973
commit
be0c13707d
@@ -38,9 +38,15 @@ bool manager_ignore_link(Manager *m, Link *link) {
|
||||
assert(m);
|
||||
assert(link);
|
||||
|
||||
/* always ignore the loopback interface */
|
||||
if (link->flags & IFF_LOOPBACK)
|
||||
return true;
|
||||
|
||||
/* if interfaces are given on the command line, ignore all others */
|
||||
if (m->interfaces && !strv_contains(m->interfaces, link->ifname))
|
||||
return true;
|
||||
|
||||
/* ignore interfaces we explicitly are asked to ignore */
|
||||
STRV_FOREACH(ignore, m->ignore)
|
||||
if (fnmatch(*ignore, link->ifname, 0) == 0)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user