system: do the same here

The async case yields to the GUI page rendering so do not
modify it.
This commit is contained in:
Franco Fichtner 2022-12-14 08:57:00 +01:00
parent b258333ae7
commit e01c506cc4

View File

@ -1133,6 +1133,9 @@ function reset_factory_defaults($sync = true)
$shutdown_cmd = '/sbin/shutdown -op now';
if ($sync) {
mwexec($shutdown_cmd);
while (true) {
sleep(1);
}
} else {
mwexec_bg($shutdown_cmd);
}