Skip to content

Commit fc96e77

Browse files
committed
sysutils/busybox: fix reboot/halt/poweroff commands
1 parent 5560f5f commit fc96e77

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

sysutils/busybox/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PORTNAME= busybox
22
PORTVERSION= 1.36.1
3+
PORTREVISION= 1
34
CATEGORIES= sysutils misc shells
45
MASTER_SITES= https://busybox.net/downloads/
56

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- init/halt.c.orig 2021-01-01 10:52:27 UTC
2+
+++ init/halt.c
3+
@@ -169,8 +169,11 @@ int halt_main(int argc UNUSED_PARAM, char **argv)
4+
RB_POWER_OFF,
5+
RB_AUTOBOOT
6+
};
7+
+#if defined(__FreeBSD__)
8+
+ static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGINT };
9+
+#else
10+
static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGTERM };
11+
-
12+
+#endif
13+
int delay = 0;
14+
int which, flags, rc;
15+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- init/reboot.h.orig 2023-07-16 21:31:29 UTC
2+
+++ init/reboot.h
3+
@@ -12,6 +12,9 @@
4+
# define RB_DISABLE_CAD 0
5+
# define RB_POWER_OFF 0x4321fedc
6+
# define RB_AUTOBOOT 0x01234567
7+
+# elif defined(__FreeBSD__)
8+
+# define RB_HALT_SYSTEM RB_HALT
9+
+# define RB_POWER_OFF RB_POWEROFF
10+
# elif defined(RB_HALT)
11+
# define RB_HALT_SYSTEM RB_HALT
12+
# endif

0 commit comments

Comments
 (0)