Fixed a bug where unused interfaces were not being ignored.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 9 months ago
parent b74900c2fc
commit ad0a353a89
  1. 5
      Anvil/Tools/Network.pm

@ -4445,6 +4445,9 @@ sub read_nmcli
} }
} }
# If I still don't have a device, ignore this.
next if not $device;
# Make it easy to look up a device's UUID by device or name. # Make it easy to look up a device's UUID by device or name.
$anvil->data->{nmcli}{$host}{name_to_uuid}{$name} = $uuid; $anvil->data->{nmcli}{$host}{name_to_uuid}{$name} = $uuid;
$anvil->data->{nmcli}{$host}{device_to_uuid}{$device} = $uuid; $anvil->data->{nmcli}{$host}{device_to_uuid}{$device} = $uuid;
@ -4704,7 +4707,7 @@ sub wait_for_network
next if $anvil->data->{network}{watch}{$interface_name}{ready}; next if $anvil->data->{network}{watch}{$interface_name}{ready};
my $uuid = $anvil->data->{network}{watch}{$interface_name}{uuid}; my $uuid = $anvil->data->{network}{watch}{$interface_name}{uuid};
my $type = $anvil->data->{network}{watch}{$interface_name}{type}; my $type = $anvil->data->{network}{watch}{$interface_name}{type};
my $state = $anvil->data->{nmcli}{$short_host_name}{uuid}{$uuid}{'state'}; my $state = defined $anvil->data->{nmcli}{$short_host_name}{uuid}{$uuid}{'state'} ? $anvil->data->{nmcli}{$short_host_name}{uuid}{$uuid}{'state'} : 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
's1:interface_name' => $interface_name, 's1:interface_name' => $interface_name,
's2:type' => $type, 's2:type' => $type,

Loading…
Cancel
Save