init,halt: portability improvements

* make init and halt use the same RB_* constants for reboot()
* conditionalize the Linux-specific code

Inspired by init.init.diff from the Debian kFreeBSD patches at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Jeremie Koenig
2010-05-27 15:38:44 +02:00
committed by Denys Vlasenko
parent f812eace18
commit 714674e4da
4 changed files with 40 additions and 23 deletions

View File

@@ -10,7 +10,6 @@ INSERT
config INIT
bool "init"
default y
depends on PLATFORM_LINUX
select FEATURE_SYSLOG
help
init is the first program run when the system boots.
@@ -93,7 +92,6 @@ config FEATURE_INITRD
config HALT
bool "poweroff, halt, and reboot"
default y
depends on PLATFORM_LINUX
help
Stop all processes and either halt, reboot, or power off the system.