mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00:00
Reenable verbose mode at reboot, if disabled at boot
This patch reenables verbose mode at shutdown/reboot, if it was disabled at boot. This allows the user to see the output from the `urandom.so` and `hwclock.so` plugins at reboot. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
7027cbc439
commit
59d96f264d
1 file changed
+11
@@ -38,12 +38,14 @@
|
|||||||
* It activates the kbrequest action.
|
* It activates the kbrequest action.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sched.h>
|
||||||
#include <string.h> /* strerror() */
|
#include <string.h> /* strerror() */
|
||||||
#include <sys/reboot.h>
|
#include <sys/reboot.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include "finit.h"
|
#include "finit.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
#include "config.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
@@ -64,6 +66,15 @@ void do_shutdown(int sig)
|
|||||||
if (sdown)
|
if (sdown)
|
||||||
run_interactive(sdown, "Calling shutdown hook: %s", sdown);
|
run_interactive(sdown, "Calling shutdown hook: %s", sdown);
|
||||||
|
|
||||||
|
/* If we enabled terse mode at boot, restore to previous setting at shutdown */
|
||||||
|
if (quiet) {
|
||||||
|
verbose = VERBOSE_MODE;
|
||||||
|
if (verbose) {
|
||||||
|
sched_yield();
|
||||||
|
fputs("\n", stderr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Call all shutdown hooks before rebooting... */
|
/* Call all shutdown hooks before rebooting... */
|
||||||
plugin_run_hooks(HOOK_SHUTDOWN);
|
plugin_run_hooks(HOOK_SHUTDOWN);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user