network parser: iterate deterministically

makes the behaviour easier to analyze, and also helps when testing since it
allows constructing test cases that trigger certain order of parsing.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2023-12-21 16:30:23 +01:00 committed by Wolfgang Bumiller
parent e8c1bbfca2
commit fcc97ec96d

View File

@ -1030,7 +1030,7 @@ sub __read_etc_network_interfaces {
};
}
foreach my $iface (keys %$ifaces) {
foreach my $iface (sort keys %$ifaces) {
my $d = $ifaces->{$iface};
$d->{type} = 'unknown';
if ($iface =~ m/^bond\d+$/) {