]> git.proxmox.com Git - pve-network.git/commitdiff
controllers: fix interfacing with read_etc_network_interfaces
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Nov 2023 10:37:05 +0000 (11:37 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Nov 2023 11:48:24 +0000 (12:48 +0100)
While not used currently in the parser, passing 1 as file name still
makes no sense, and we might want to rework that in general, as why
does this have to use the non-inotify read path and manually open the
file.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network/SDN/Controllers.pm

index f5a6b8646fa48dcbb7dd7879a9b4b43713b27017..95f33944b5c02dbc6fbce42be60e2f91eae17594 100644 (file)
@@ -79,10 +79,10 @@ sub generate_controller_config {
 
     return if !$vnet_cfg && !$zone_cfg && !$controller_cfg;
 
-    #read main config for physical interfaces
+    # read main config for physical interfaces
     my $current_config_file = "/etc/network/interfaces";
     my $fh = IO::File->new($current_config_file);
-    my $interfaces_config = PVE::INotify::read_etc_network_interfaces(1,$fh);
+    my $interfaces_config = PVE::INotify::read_etc_network_interfaces($current_config_file, $fh);
     $fh->close();
 
     # check uplinks