mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
system: closelog() has timing issues
Not sure where this comes from but the concensus is that closelog() is relatively useless and testing verifies that it works as expected without it. Now we just have to make sure that each component using openlog() will reopen the actual GUI log so that it can keep logging correctly.
This commit is contained in:
parent
3612583d58
commit
b563c223bf
@ -84,8 +84,6 @@ function reopenlog()
|
||||
|
||||
reopenlog();
|
||||
|
||||
register_shutdown_function('closelog');
|
||||
|
||||
require_once("xmlparse.inc");
|
||||
require_once("legacy_bindings.inc");
|
||||
require_once("certs.inc");
|
||||
|
||||
@ -267,7 +267,6 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unset($fobj);
|
||||
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("done.\n", $verbose);
|
||||
@ -407,7 +406,6 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unset($fobj);
|
||||
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("failed.\n", $verbose);
|
||||
@ -442,7 +440,6 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unset($fobj);
|
||||
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("done.\n", $verbose);
|
||||
|
||||
@ -621,6 +621,5 @@ function unbound_add_host_entries($ifconfig_details)
|
||||
|
||||
file_put_contents('/var/unbound/host_entries.conf', $unbound_entries);
|
||||
|
||||
closelog();
|
||||
reopenlog();
|
||||
}
|
||||
|
||||
@ -181,14 +181,9 @@ function wireguard_sync($verbose = false)
|
||||
|
||||
service_log('Synchronizing WireGuard VPN...', $verbose);
|
||||
|
||||
openlog('wireguard', LOG_ODELAY, LOG_AUTH);
|
||||
|
||||
foreach ($instances as $device => $config) {
|
||||
mwexecf('/usr/bin/wg syncconf %s %s', [$device, $config]);
|
||||
}
|
||||
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("done.\n", $verbose);
|
||||
}
|
||||
|
||||
@ -619,7 +619,6 @@ class OpenVPN extends BaseModel
|
||||
$options[$opt] = str_replace(',', ':', (string)$node->$opt);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$options['persist-tun'] = null;
|
||||
$options['persist-key'] = null;
|
||||
|
||||
@ -337,4 +337,3 @@ if (isset($opts['h']) || empty($args) || !in_array($args[0], ['start', 'stop', '
|
||||
configd_run('filter reload');
|
||||
}
|
||||
}
|
||||
closelog();
|
||||
|
||||
@ -52,5 +52,4 @@ if ($server) {
|
||||
}
|
||||
}
|
||||
|
||||
closelog();
|
||||
exit(0);
|
||||
|
||||
@ -229,6 +229,4 @@ if (isset($opts['h']) || empty($args) || !in_array($args[0], ['start', 'stop', '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closelog();
|
||||
}
|
||||
|
||||
@ -71,9 +71,7 @@ openlog("openvpn", LOG_ODELAY, LOG_AUTH);
|
||||
$response = do_verify(getenv('auth_server'));
|
||||
if ($response !== true) {
|
||||
syslog(LOG_WARNING, "tls-verify : {$response}");
|
||||
closelog();
|
||||
exit(1);
|
||||
} else {
|
||||
closelog();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
@ -161,7 +161,6 @@ $response = do_auth($parms['common_name'], $parms['auth_server'], $parms['auth_m
|
||||
if (is_string($response)) {
|
||||
// send failure message to log
|
||||
syslog(LOG_WARNING, $response);
|
||||
closelog();
|
||||
}
|
||||
|
||||
if (!empty($parms['auth_defer'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user