Change to runlevel 0/6 on reboot/halt/poweroff

This patch fixes a long-standing issue with how Finit handles shutdown,
reboot and poweroff -- and even runlevel changes to runlevel 0 and 6.

Prior to this patch sig.c:do_shutdown() was called immediately on any
of the above events, disregarding any services that a user might have
wanted to run as part of the shutdown/reboot.

With this change the handling is unified in all frontends to instead
do a runlevel change followed by the do_shutdown() action.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-09-18 11:50:07 +02:00
1 parent 2c1e9877f9
commit f7d6d269c7
6 files changed
+49 -50

No files matched your search

+2
View File
@@ -66,6 +66,8 @@ typedef enum {
SHUT_REBOOT
} shutop_t;
extern shutop_t halt;
void do_shutdown (shutop_t op);
int sig_stopped (void);
void sig_init (void);