]> git.proxmox.com Git - pve-common.git/blob - test/etc_network_interfaces/t.bridge_eth_remove_auto.pl
use Encode::Locale to encode parameters read from console(getopt)
[pve-common.git] / test / etc_network_interfaces / t.bridge_eth_remove_auto.pl
1 use strict;
2
3 # access to the current config
4 our $config;
5
6 # replace proc_net_dev with one with a bunch of interfaces
7 save('proc_net_dev', <<'/proc/net/dev');
8 eth0:
9 eth1:
10 /proc/net/dev
11
12 r('');
13 update_iface('eth0', [], autostart => 1);
14 update_iface('eth1', [], autostart => 1);
15 r(w());
16 die "autostart lost" if !$config->{ifaces}->{eth0}->{autostart};
17 die "autostart lost" if !$config->{ifaces}->{eth1}->{autostart};
18 new_iface("vmbr0", 'bridge', [{ family => 'inet' }], bridge_ports => 'eth0');
19 new_iface("vmbr1", 'OVSBridge', [{ family => 'inet' }], ovs_ports => 'eth1');
20 r(w());
21 die "autostart wrongly removed for linux bridge port" if !$config->{ifaces}->{eth0}->{autostart};
22 die "autostart not removed for ovs bridge port" if $config->{ifaces}->{eth1}->{autostart};
23
24 1;