Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysutils/busybox: fix reboot/halt/poweroff commands
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- init/halt.c.orig 2021-01-01 10:52:27 UTC | ||
+++ init/halt.c | ||
@@ -169,8 +169,11 @@ int halt_main(int argc UNUSED_PARAM, char **argv) | ||
RB_POWER_OFF, | ||
RB_AUTOBOOT | ||
}; | ||
+#if defined(__FreeBSD__) | ||
+ static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGINT }; | ||
+#else | ||
static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGTERM }; | ||
- | ||
+#endif | ||
int delay = 0; | ||
int which, flags, rc; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- init/reboot.h.orig 2023-07-16 21:31:29 UTC | ||
+++ init/reboot.h | ||
@@ -12,6 +12,9 @@ | ||
# define RB_DISABLE_CAD 0 | ||
# define RB_POWER_OFF 0x4321fedc | ||
# define RB_AUTOBOOT 0x01234567 | ||
+# elif defined(__FreeBSD__) | ||
+# define RB_HALT_SYSTEM RB_HALT | ||
+# define RB_POWER_OFF RB_POWEROFF | ||
# elif defined(RB_HALT) | ||
# define RB_HALT_SYSTEM RB_HALT | ||
# endif |