diff -Naur busybox.orig/runit/Config.in busybox/runit/Config.in
--- busybox.orig/runit/Config.in	2008-09-24 19:19:59 +0000
+++ busybox/runit/Config.in	2008-09-24 20:10:12 +0000
@@ -20,6 +20,13 @@
 	  a directory, in the services directory dir, up to a limit of 1000
 	  subdirectories, and restarts a runsv process if it terminates.
 
+config FEATURE_RUNSVDIR_INIT
+	bool "Run as init"
+	depends on RUNSVDIR
+	default n
+	help
+	  Act as a simple init replacement if run as PID 1.
+
 config FEATURE_RUNSVDIR_LOG
 	bool "Enable scrolling argument log"
 	depends on RUNSVDIR
diff -Naur busybox.orig/runit/runsvdir.c busybox/runit/runsvdir.c
--- busybox.orig/runit/runsvdir.c	2008-09-24 19:19:59 +0000
+++ busybox/runit/runsvdir.c	2008-09-24 21:23:01 +0000
@@ -28,11 +28,13 @@
 /* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */
 /* TODO: depends on runit_lib.c - review and reduce/eliminate */
 
-#include <sys/poll.h>
-#include <sys/file.h>
 #include "libbb.h"
 #include "runit_lib.h"
 
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+#include <sys/reboot.h>
+#endif
+
 #define MAXSERVICES 1000
 
 /* Should be not needed - all dirs are on same FS, right? */
@@ -96,6 +98,14 @@
 }
 #endif
 
+static void killall(smallint signo)
+{
+	int i;
+	for (i = 0; i < svnum; i++)
+		if (sv[i].pid)
+			kill(sv[i].pid, signo);
+}
+
 static void runsv(int no, const char *name)
 {
 	pid_t pid;
@@ -118,6 +128,8 @@
 		bb_signals(0
 			+ (1 << SIGHUP)
 			+ (1 << SIGTERM)
+			+ (1 << SIGUSR1)
+			+ (1 << SIGUSR2)
 			, SIG_DFL);
 		execvp(prog[0], prog);
 		fatal2_cannot("start runsv ", name);
@@ -220,6 +232,10 @@
 	unsigned now;
 	unsigned stampcheck;
 	int i;
+	// are we init?
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+	bool is_init = 1 == getpid();
+#endif
 
 	INIT_G();
 
@@ -227,7 +243,14 @@
 	set_pgrp = getopt32(argv, "P");
 	argv += optind;
 
-	bb_signals_recursive((1 << SIGTERM) | (1 << SIGHUP), record_signo);
+	bb_signals_recursive(
+		  (1 << SIGTERM)
+		+ (1 << SIGHUP)
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+		+ ((1 << SIGUSR1) + (1 << SIGUSR2)) * is_init
+#endif
+		, record_signo);
+
 	svdir = *argv++;
 
 #if ENABLE_FEATURE_RUNSVDIR_LOG
@@ -341,16 +364,59 @@
 			}
 		}
 #endif
-		switch (bb_got_signal) {
-		case SIGHUP:
-			for (i = 0; i < svnum; i++)
-				if (sv[i].pid)
-					kill(sv[i].pid, SIGTERM);
-			// N.B. fall through
-		case SIGTERM:
-			_exit((SIGHUP == bb_got_signal) ? 111 : EXIT_SUCCESS);
+
+		if (bb_got_signal) {
+			// init signalled -> sync and wait a while
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+			if (is_init) {
+				// sync
+				sync(); sleep(1);
+			}
+#endif
+			// init signalled -> kill all services
+			// vanilla runsvdir SIGHUP signalled -> kill all services
+			if (SIGHUP == bb_got_signal
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+				|| is_init
+#endif
+			) {
+				// terminate services
+				killall(SIGTERM);
+			}
+
+			// vanilla runsvdir, any signal causes exit
+			// just do on exiting
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+			if (!is_init)
+#endif
+				break;
+
+#if ENABLE_FEATURE_RUNSVDIR_INIT
+			// N.B. we are here if we are init
+
+			// SIGHUP means go on serving
+			if (SIGHUP == bb_got_signal)
+				bb_got_signal = 0;
+
+			// SIGUSR1 means halt
+			// SIGUSR2 means poweroff
+			// SIGTERM means reboot
+			// let services exit cleanly
+			sync(); sleep(5);
+			// kill survived services
+			killall(SIGKILL);
+			sync(); sleep(1);
+			// umount -a
+			// ???
+			// reboot
+			reboot(
+				(SIGUSR1 == bb_got_signal) ? RB_HALT_SYSTEM :
+				(SIGUSR2 == bb_got_signal) ? RB_POWER_OFF : RB_AUTOBOOT
+			);
+#endif
 		}
 	}
-	/* not reached */
-	return 0;
+
+	/* N.B. never get here if is init */
+	return (SIGHUP == bb_got_signal) ? 111 : EXIT_SUCCESS;
 }
