Don't crash out if network config file is missing https://www.virtualmin.com/node/70222

This commit is contained in:
Jamie Cameron
2020-11-20 17:02:00 -08:00
parent 5c828afd5c
commit 6dd4ff5dd0

View File

@@ -779,8 +779,7 @@ sub get_interface_defs
{
local *CFGFILE;
my @ret;
&open_readfile(CFGFILE, $network_interfaces_config) ||
error("Unable to open $network_interfaces_config");
&open_readfile(CFGFILE, $network_interfaces_config) || return ();
# read the file line by line
$line = <CFGFILE>;
while (defined $line) {