mirror of
git://git.proxmox.com/git/pve-common.git
synced 2024-12-22 21:33:47 +03:00
aeac55e138
In commit 21d32c95cd
autostart was removed from all bridge
ports but should have only been removed from ovs bridge ports.
25 lines
771 B
Perl
25 lines
771 B
Perl
use strict;
|
|
|
|
# access to the current config
|
|
our $config;
|
|
|
|
# replace proc_net_dev with one with a bunch of interfaces
|
|
save('proc_net_dev', <<'/proc/net/dev');
|
|
eth0:
|
|
eth1:
|
|
/proc/net/dev
|
|
|
|
r('');
|
|
update_iface('eth0', [], autostart => 1);
|
|
update_iface('eth1', [], autostart => 1);
|
|
r(w());
|
|
die "autostart lost" if !$config->{ifaces}->{eth0}->{autostart};
|
|
die "autostart lost" if !$config->{ifaces}->{eth1}->{autostart};
|
|
new_iface("vmbr0", 'bridge', [{ family => 'inet' }], bridge_ports => 'eth0');
|
|
new_iface("vmbr1", 'OVSBridge', [{ family => 'inet' }], ovs_ports => 'eth1');
|
|
r(w());
|
|
die "autostart wrongly removed for linux bridge port" if !$config->{ifaces}->{eth0}->{autostart};
|
|
die "autostart not removed for ovs bridge port" if $config->{ifaces}->{eth1}->{autostart};
|
|
|
|
1;
|