Commit cc90a69d authored by Franco Fichtner's avatar Franco Fichtner

interfaces: fix a crash report, proper error reporting while at it

(cherry picked from commit 05e75ec6)
parent 7be6bba3
......@@ -4000,8 +4000,15 @@ function DHCP_Config_File_Advanced($interface, $wancfg, $wanif)
function DHCP_Config_File_Override($wancfg, $wanif)
{
$dhclientconf = file_get_contents($wancfg['adv_dhcp_config_file_override_path']);
$dhclientfile = $wancfg['adv_dhcp_config_file_override_path'];
$dhclientconf = '';
if (file_exists($dhclientfile)) {
$dhclientconf = file_get_contents($hclientfile);
$dhclientconf = DHCP_Config_File_Substitutions($wancfg, $wanif, $dhclientconf);
} else {
log_error(sprintf(gettext('DHCP config file override does not exist: %s'), $dhclientfile));
}
return $dhclientconf;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment