mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Adopt BusyBox init signal handling for halt/reboot/poweroff
This patch adopts the BusyBox init signals for handling halt, reboot, and poweroff. The SIGINT and SIGPWR signals still behave the same as before, even though they likely will become configurable in a future release. Note: the disabling of Ctrl-Alt-Delete (SIGINT) is also removed! Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -255,7 +255,7 @@ static void cb(uev_t *w, void *UNUSED(arg), int UNUSED(events))
|
||||
switch (rq.runlevel) {
|
||||
case '0':
|
||||
_d("Halting system (SIGUSR2)");
|
||||
do_shutdown(SIGUSR2);
|
||||
do_shutdown(SHUT_OFF);
|
||||
break;
|
||||
|
||||
case 's':
|
||||
@@ -272,7 +272,7 @@ static void cb(uev_t *w, void *UNUSED(arg), int UNUSED(events))
|
||||
|
||||
case '6':
|
||||
_d("Rebooting system (SIGUSR1)");
|
||||
do_shutdown(SIGUSR1);
|
||||
do_shutdown(SHUT_REBOOT);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user