From e01c506cc4be6b7e566870702e2cfd644c39e028 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 14 Dec 2022 08:57:00 +0100 Subject: [PATCH] system: do the same here The async case yields to the GUI page rendering so do not modify it. --- src/etc/inc/system.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 1953cef5b..1c91a4e36 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -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); }