mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Reenable terse mode at shutdown/reboot
Now that we change runlevel at shutdown/reboot, we also need to restore terse mode before calling the shutdown hooks, like before. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
0f61b0792b
commit
c3b7530b98
2 files changed
+10
-10
No files matched your search
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "config.h" /* Generated by configure script */
|
||||
|
||||
#include <sched.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/if.h>
|
||||
@@ -487,6 +488,15 @@ void service_reload_dynamic(void)
|
||||
void service_runlevel(int newlevel)
|
||||
{
|
||||
if (newlevel == 0 || newlevel == 6) {
|
||||
/* If we enabled terse mode at boot, restore to previous setting at shutdown */
|
||||
if (quiet) {
|
||||
silent = SILENT_MODE;
|
||||
if (!silent) {
|
||||
sched_yield();
|
||||
fputs("\n", stderr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Call all shutdown hooks before rebooting... */
|
||||
plugin_run_hooks(HOOK_SHUTDOWN);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user