notice: before fitching notice, let's make sure these messages are actually being forwarded to syslog (https://github.com/opnsense/core/issues/4018). this also eases debugging if you can inspect issues in context of other events.

This commit is contained in:
Ad Schellevis 2020-05-04 15:30:42 +02:00
parent 67e4751fb7
commit 1f4bf173d1

View File

@ -528,11 +528,13 @@ function filter_configure_sync($verbose = false, $flush_states = false, $load_al
/* Brutal ugly hack but required -- PF is stuck, unwedge */
if (strstr("$rules_error[0]", "busy")) {
exec('/sbin/pfctl -d; /sbin/pfctl -e; /sbin/pfctl -f /tmp/rules.debug');
log_error('PF was wedged/busy and has been reset.');
file_notice(gettext('PF was wedged/busy and has been reset.'));
} else {
exec('/sbin/pfctl -o basic -f /tmp/rules.debug.old 2>&1');
}
log_error(sprintf('There were error(s) loading the rules: %s%s', $rules_error[0], $config_line));
file_notice(sprintf(gettext('There were error(s) loading the rules: %s%s'), $rules_error[0], $config_line));
unlock($filterlck);
@ -697,6 +699,7 @@ function filter_generate_aliases()
# a bit of a hack, but prevents the ruleset from not being able to load if these types are in
# the configuration.
$aliases .= "{$aliased['name']} = \"{ 0 <> 65535 }\"\n";
log_error(sprintf('URL port aliases types not supported [%s]', $aliased['name']));
file_notice(sprintf(gettext('URL port aliases types not supported [%s]'), $aliased['name']));
break;
case "port":