[pve-devel] [PATCH pve-network 1/7] don't sort interfaces in /etc/network/interfaces.d/sdn
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue May 19 16:43:20 CEST 2020
On 5/19/20 3:48 PM, Alexandre Derumier wrote:
> Sometime, ifupdown2 can't handle depend correctly, and interface order is used
>
makes no sense, this is a hash and perl actively re-orders the return
set of keys pseudo-randomly ..
If order is really required use an array.
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> PVE/Network/SDN/Zones.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/Network/SDN/Zones.pm b/PVE/Network/SDN/Zones.pm
> index 436b103..435e40b 100644
> --- a/PVE/Network/SDN/Zones.pm
> +++ b/PVE/Network/SDN/Zones.pm
> @@ -113,7 +113,7 @@ sub generate_etc_network_config {
> }
>
> my $raw_network_config = "\#version:$version\n";
> - foreach my $iface (sort keys %$config) {
> + foreach my $iface (keys %$config) {
> $raw_network_config .= "\n";
> $raw_network_config .= "auto $iface\n";
> $raw_network_config .= "iface $iface\n";
>
More information about the pve-devel
mailing list