diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 1eaec21..c507515 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1487,6 +1487,7 @@ sub __write_etc_network_interfaces { if ($d->{type} eq 'OVSBond' && $d->{ovs_bonds}) { foreach my $p (split (/\s+/, $d->{ovs_bonds})) { my $n = $ifaces->{$p}; + $n->{autostart} = 1; die "OVS bond '$iface' - unable to find slave '$p'\n" if !$n; die "OVS bond '$iface' - wrong interface type on slave '$p' " . @@ -1503,6 +1504,7 @@ sub __write_etc_network_interfaces { my $bond_primary_is_slave = undef; foreach my $p (split (/\s+/, $d->{slaves})) { my $n = $ifaces->{$p}; + $n->{autostart} = 1; die "bond '$iface' - unable to find slave '$p'\n" if !$n; diff --git a/test/etc_network_interfaces/t.create_network.pl b/test/etc_network_interfaces/t.create_network.pl index 22e7142..b8da513 100644 --- a/test/etc_network_interfaces/t.create_network.pl +++ b/test/etc_network_interfaces/t.create_network.pl @@ -109,8 +109,10 @@ iface eth0 inet manual $eth1_part +auto eth2 iface eth2 inet manual +auto eth3 iface eth3 inet manual iface eth4 inet manual @@ -167,8 +169,10 @@ iface eth0 inet manual $eth1_part +auto eth2 iface eth2 inet manual +auto eth3 iface eth3 inet manual iface eth4 inet manual @@ -284,8 +288,10 @@ iface eth0 inet manual $eth1_part +auto eth2 iface eth2 inet manual +auto eth3 iface eth3 inet manual iface eth4 inet manual @@ -398,12 +404,16 @@ iface eth0 inet manual $eth1_part +auto eth2 iface eth2 inet manual +auto eth3 iface eth3 inet manual +auto eth4 iface eth4 inet manual +auto eth5 iface eth5 inet manual auto eth1.100 diff --git a/test/etc_network_interfaces/t.unknown_order.pl b/test/etc_network_interfaces/t.unknown_order.pl index cd8f51b..44c0392 100644 --- a/test/etc_network_interfaces/t.unknown_order.pl +++ b/test/etc_network_interfaces/t.unknown_order.pl @@ -2,16 +2,22 @@ my $base = load('loopback'); sub wanted($) { my ($ip) = @_; return $base . <<"IFACES"; +auto eth0 iface eth0 inet manual +auto eth1 iface eth1 inet manual +auto eth2 iface eth2 inet manual +auto eth3 iface eth3 inet manual +auto eth4 iface eth4 inet manual +auto eth5 iface eth5 inet manual iface eth6 inet manual