aboutsummaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-01-30 08:31:37 +0000
committerRob Landley <rob@landley.net>2006-01-30 08:31:37 +0000
commit646129163a26171d48a335f7e22828848cf28cc5 (patch)
tree1e57cdfe9be4ec15c27276389a760f3ad6b5ab34 /init/init.c
parent49576c0018358beda0e79e0ebb247b90e347e6e0 (diff)
downloadbusybox-w32-646129163a26171d48a335f7e22828848cf28cc5.tar.gz
busybox-w32-646129163a26171d48a335f7e22828848cf28cc5.tar.bz2
busybox-w32-646129163a26171d48a335f7e22828848cf28cc5.zip
Re-add initrd support, unify halt/reboot/poweroff, add -n and -f options.
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/init/init.c b/init/init.c
index 337d31c2d..0db355413 100644
--- a/init/init.c
+++ b/init/init.c
@@ -751,14 +751,7 @@ static void exec_signal(int sig)
751static void halt_signal(int sig) 751static void halt_signal(int sig)
752{ 752{
753 shutdown_system(); 753 shutdown_system();
754 message(CONSOLE | LOG, 754 message(CONSOLE | LOG, "The system is halted.");
755#if #cpu(s390)
756 /* Seems the s390 console is Wierd(tm). */
757 "The system is halted. You may reboot now."
758#else
759 "The system is halted. Press Reset or turn off power"
760#endif
761 );
762 sync(); 755 sync();
763 756
764 /* allow time for last message to reach serial console */ 757 /* allow time for last message to reach serial console */
@@ -1024,11 +1017,9 @@ extern int init_main(int argc, char **argv)
1024 } 1017 }
1025#ifndef DEBUG_INIT 1018#ifndef DEBUG_INIT
1026 /* Expect to be invoked as init with PID=1 or be invoked as linuxrc */ 1019 /* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
1027 if (getpid() != 1 1020 if (getpid() != 1 &&
1028#ifdef CONFIG_FEATURE_INITRD 1021 (!ENABLE_FEATURE_INITRD || !strstr(bb_applet_name, "linuxrc")))
1029 && strstr(bb_applet_name, "linuxrc") == NULL 1022 {
1030#endif
1031 ) {
1032 bb_show_usage(); 1023 bb_show_usage();
1033 } 1024 }
1034 /* Set up sig handlers -- be sure to 1025 /* Set up sig handlers -- be sure to