mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
firmware: add async reconfigure hook to syslog
rc.configure_plugins is likely fixed, but rc.configure_firmware has the same issue so make this more maintanable by moving the async request to the system function and put the former call back with the async flag set. Should fix syslog-ng related package configure hangs with regard to pkg-based bug in recent versions.
This commit is contained in:
parent
0ad3ec432f
commit
4e9a8abf98
@ -584,14 +584,25 @@ function system_syslogd_extra_local($logsocket)
|
||||
return exec_safe('-l %s ', $logsocket);
|
||||
}
|
||||
|
||||
function system_syslogd_start($verbose = false, $restart = false)
|
||||
function system_syslogd_start($verbose = false, $restart = false, $async = false)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if ($verbose) {
|
||||
echo 'Configuring system logging...';
|
||||
flush();
|
||||
}
|
||||
|
||||
if ($async) {
|
||||
configd_run('syslog restart');
|
||||
|
||||
if ($verbose) {
|
||||
echo "done.\n";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
configd_run('template reload OPNsense/Syslog');
|
||||
|
||||
if (empty($config['syslog']['disable_clog'])) {
|
||||
|
||||
@ -48,7 +48,7 @@ convert_config(true);
|
||||
system_firmware_configure(true);
|
||||
system_trust_configure(true);
|
||||
system_login_configure(true);
|
||||
system_syslogd_start(true);
|
||||
system_syslogd_start(true, false, true);
|
||||
|
||||
/* flush user-facing caches */
|
||||
(new OPNsense\Core\ACL())->invalidateCache();
|
||||
|
||||
@ -42,10 +42,7 @@ $script = !empty($argv[1]) ? $argv[1] : 'POST_INSTALL';
|
||||
|
||||
/* reload subsystem that may have changed */
|
||||
if ($script == 'POST_INSTALL') {
|
||||
echo 'Configuring system logging...';
|
||||
flush();
|
||||
configd_run("syslog restart");
|
||||
echo "done.\n";
|
||||
system_syslogd_start(true, false, true);
|
||||
}
|
||||
|
||||
/* flush user-facing caches */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user