]> git.proxmox.com Git - pve-common.git/blobdiff - test/etc_network_interfaces/runtest.pl
bump version to 4.0-63
[pve-common.git] / test / etc_network_interfaces / runtest.pl
index ba26dcdab3c7a2fee8feaec67eb7b8281c02a1e2..92cd7f8d777ef52b45f609ad117cecb590a985b4 100755 (executable)
@@ -59,16 +59,15 @@ sub flush_files() {
 ## Interface parsing:
 ##
 
-# Read an interfaces file with optional /proc/net/dev and /proc/net/if_inet6
-# file content strings, which default to the provided ones.
+# Read an interfaces file with optional /proc/net/dev file content string and
+# the list of active interfaces, which otherwise default
 sub r($;$$) {
-    my ($ifaces, $proc_net_dev, $proc_net_if_inet6) = @_;
+    my ($ifaces, $proc_net_dev, $active) = @_;
     $proc_net_dev //= load('proc_net_dev');
-    $proc_net_if_inet6 //= load('proc_net_if_inet6');
+    $active //= [split(/\s+/, load('active_interfaces'))];
     open my $fh1, '<', \$ifaces;
     open my $fh2, '<', \$proc_net_dev;
-    open my $fh3, '<', \$proc_net_if_inet6;
-    $config = PVE::INotify::__read_etc_network_interfaces($fh1, $fh2, $fh3);
+    $config = PVE::INotify::__read_etc_network_interfaces($fh1, $fh2, $active);
     close $fh1;
 }