Skip to content

Commit

Permalink
interfaces: annotate device dependency issue #5540
Browse files Browse the repository at this point in the history
The scope for this is larger (VLAN/QinQ/LAGG) so here we just try
to raise awareness for future refactor if other device types.
  • Loading branch information
fichtner committed Mar 2, 2022
1 parent 94db2d4 commit 2164310
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/etc/inc/interfaces.inc
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ function interfaces_configure($verbose = false)
foreach ($list as $device => $if) {
/* pre-op: configuring the underlying device */
if (!empty($devices[$device])) {
/* XXX devices could depend on other devices */
log_msg("Device $device required for $if, configuring now", LOG_ERR);
call_user_func_array($devices[$device], [$device]);
unset($devices[$device]);
Expand All @@ -786,6 +787,7 @@ function interfaces_configure($verbose = false)

/* last but not least start all unconfigured devices */
foreach ($devices as $name => $function) {
/* XXX devices could depend on other devices */
log_msg("Device $name is not assigned, configuring late", LOG_ERR);
call_user_func_array($function, [$name]);
}
Expand Down

0 comments on commit 2164310

Please sign in to comment.