From: Thomas Lamprecht Date: Wed, 29 Nov 2023 10:38:47 +0000 (+0100) Subject: controllers: die if opening network interface config fails X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1e289d23030a126610b9c06e4b10f29d34633dbd;p=matthieu%2Fpve-network.git controllers: die if opening network interface config fails we should not continue in that case.. Signed-off-by: Thomas Lamprecht --- 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();