From 1e289d23030a126610b9c06e4b10f29d34633dbd Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 29 Nov 2023 11:38:47 +0100 Subject: [PATCH] controllers: die if opening network interface config fails we should not continue in that case.. Signed-off-by: Thomas Lamprecht --- src/PVE/Network/SDN/Controllers.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Controllers.pm b/src/PVE/Network/SDN/Controllers.pm index 95f3394..167d3ea 100644 --- a/src/PVE/Network/SDN/Controllers.pm +++ b/src/PVE/Network/SDN/Controllers.pm @@ -81,7 +81,7 @@ sub generate_controller_config { # read main config for physical interfaces my $current_config_file = "/etc/network/interfaces"; - my $fh = IO::File->new($current_config_file); + my $fh = IO::File->new($current_config_file) or die "failed to open $current_config_file - $!\n"; my $interfaces_config = PVE::INotify::read_etc_network_interfaces($current_config_file, $fh); $fh->close(); -- 2.39.5