diff -Naur busybox.orig/include/applets.h busybox/include/applets.h
--- busybox.orig/include/applets.h	2008-10-13 20:49:09 +0000
+++ busybox/include/applets.h	2008-10-14 20:11:03 +0000
@@ -69,6 +69,7 @@
 
 USE_TEST(APPLET_NOFORK([,  test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
 USE_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
+USE_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_NEVER))
 USE_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER))
 USE_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER))
 USE_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER))
diff -Naur busybox.orig/include/usage.h busybox/include/usage.h
--- busybox.orig/include/usage.h	2008-10-13 20:49:09 +0000
+++ busybox/include/usage.h	2008-10-15 00:29:46 +0000
@@ -17,6 +17,22 @@
 #define NOUSAGE_STR "\b"
 
 
+#if !ENABLE_FEATURE_ACPID_DEPRECATED
+#define acpid_trivial_usage \
+       "[OPTIONS] files..."
+#else
+#define acpid_trivial_usage \
+       "[OPTIONS]"
+#endif
+#define acpid_full_usage "\n\n" \
+       "Listen to ACPI events and spawn specific application\n" \
+     "\nOptions:" \
+     "\n	-d		Debug. Print all events." \
+     "\n	-c dir		Config directory [/etc/acpi]" \
+     USE_FEATURE_ACPID_DEPRECATED( \
+     "\n	-e file		Event file. Default is /proc/acpi/event" \
+     )
+
 #define addgroup_trivial_usage \
        "[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
 #define addgroup_full_usage "\n\n" \
diff -Naur busybox.orig/util-linux/Config.in busybox/util-linux/Config.in
--- busybox.orig/util-linux/Config.in	2008-10-13 20:49:10 +0000
+++ busybox/util-linux/Config.in	2008-10-15 00:04:09 +0000
@@ -5,6 +5,22 @@
 
 menu "Linux System Utilities"
 
+config ACPID
+	bool "acpid"
+	default n
+	select RUN_PARTS
+	help
+	  acpid listens to ACPI events from /proc/acpi/event and spawns
+	  corresponding applications.
+
+config FEATURE_ACPID_DEPRECATED
+	bool "Use deprecated /proc/acpi/event interface"
+	default n
+	depends on ACPID
+	help
+	  Read events from deprecated but widely used /proc/acpi/event
+	  interface.
+
 config BLKID
 	bool "blkid"
 	default n
diff -Naur busybox.orig/util-linux/Kbuild busybox/util-linux/Kbuild
--- busybox.orig/util-linux/Kbuild	2008-10-13 20:49:10 +0000
+++ busybox/util-linux/Kbuild	2008-10-14 20:11:03 +0000
@@ -5,6 +5,7 @@
 # Licensed under the GPL v2, see the file LICENSE in this tarball.
 
 lib-y:=
+lib-$(CONFIG_ACPID)             += acpid.o
 lib-$(CONFIG_BLKID)             += blkid.o
 lib-$(CONFIG_DMESG)             += dmesg.o
 lib-$(CONFIG_FBSET)             += fbset.o
diff -Naur busybox.orig/util-linux/acpid.c busybox/util-linux/acpid.c
--- busybox.orig/util-linux/acpid.c	1970-01-01 00:00:00 +0000
+++ busybox/util-linux/acpid.c	2008-10-15 00:21:38 +0000
@@ -0,0 +1,169 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * acpid listens to ACPI events and spawns specific applications
+ *
+ * Copyright (C) 2008 by Vladimir Dronnikov <dronnikov@gmail.com>
+ *
+ * Licensed under GPLv2, see file LICENSE in this tarball for details.
+ */
+#include "libbb.h"
+
+static void process_event(const char *event)
+{
+	struct stat st;
+	char *handler = xasprintf("./%s", event);
+	const char *args[] = { "run-parts", handler, NULL };
+
+	// debug info
+	if (option_mask32 & 1 /*OPT_d*/)
+		bb_info_msg(event);
+
+	// spawn handler
+	// N.B. run-parts would require scripts be started via #!/bin/sh
+	// handler is directory? -> use run-parts
+	// handler is file? -> run it directly
+	if (0 == stat(event, &st))
+		spawn((char **)args + (0==(st.st_mode & S_IFDIR)));
+	else
+		bb_perror_msg("can't stat '%s'", event);
+	free(handler);
+}
+
+
+#if ENABLE_FEATURE_ACPID_DEPRECATED
+
+/*
+	acpid [-d] [-c conf_dir] [-e event_file]
+*/
+
+#define ACPID_COMPAT 0
+int acpid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int acpid_main(int argc UNUSED_PARAM, char **argv)
+{
+	const char *opt_conf = "/etc/acpi";
+	const char *opt_input = "/proc/acpi/event";
+	parser_t *parser;
+	char *token[4];
+
+	//opt_complementary = "";
+	getopt32(argv,
+		"dc:e:"
+#if ACPID_COMPAT
+		"g:l:m:s:S:v"
+#endif
+		, &opt_conf, &opt_input
+#if ACPID_COMPAT
+		, NULL, NULL, NULL, NULL, NULL, NULL
+#endif
+	);
+	argv += optind;
+
+	// /proc/acpi/event is the "config" :)
+	parser = config_open(opt_input);
+
+	// dispatch events
+	while (config_read(parser, token, 4, 4, "\0 ", PARSE_NORMAL)) {
+		char *event = xasprintf("%s/%s", token[1], token[2]);
+		process_event(event);
+		free(event);
+	}
+
+	// cleanup
+	if (ENABLE_FEATURE_CLEAN_UP)
+		config_close(parser);
+
+	return EXIT_SUCCESS;
+}
+#undef ACPID_COMPAT
+
+#else
+
+#include <linux/input.h>
+#ifndef SW_RFKILL_ALL
+#	define SW_RFKILL_ALL 3
+#endif
+
+/*
+	acpid [-c conf_dir] [-d] event-files...
+*/
+
+int acpid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int acpid_main(int argc, char **argv)
+{
+	const char *opt_conf = "/etc/acpi";
+	struct pollfd *pfd;
+	int i;
+
+	opt_complementary = "-1";
+	getopt32(argv, "dc:", &opt_conf);
+	argc -= optind;
+	argv += optind;
+
+	// open event devices
+	pfd = xzalloc(sizeof(*pfd) * argc);
+	for (i = 0; i < argc; i++) {
+		pfd[i].fd = open_or_warn(argv[i], O_RDONLY);
+		pfd[i].events = POLLIN;
+	}
+
+	// goto configuration directory
+	xchdir(opt_conf);
+
+	// setup signals
+	bb_signals(0
+		+ (1 << SIGINT)
+		+ (1 << SIGTERM)
+		, record_signo);
+
+
+	// dispatch events
+	while (!bb_got_signal && safe_poll(pfd, argc, -1) > 0) {
+		for (i = 0; i < argc; i++) {
+			if (pfd[i].revents & POLLIN) {
+				struct input_event ev;
+				if (sizeof(ev) == full_read(pfd[i].fd, &ev, sizeof(ev))) {
+					const char *event = NULL;
+					// filter out unneeded events
+//bb_info_msg("%d: %d %d %4d", i, ev.type, ev.code, ev.value);
+					if (ev.value != 1)
+						continue;
+					// N.B. we will conform /proc/acpi/event naming convention
+					// when assigning event names
+
+					// TODO: do we want other events?
+
+					// power and sleep buttons delivered as keys pressed
+					if (EV_KEY == ev.type) {
+						if (KEY_POWER == ev.code)
+							event = "PWRF/00000080";
+						else if (KEY_SLEEP == ev.code)
+							event = "SLPB/00000080";
+					// switches
+					} else if (EV_SW == ev.type) {
+						if (SW_LID == ev.code)
+							event = "LID/00000080";
+//						else if (SW_RFKILL_ALL == ev.code)
+//							event = "RFKILL";
+					}
+					// filter out unneeded events
+					if (!event)
+						continue;
+
+					// spawn event handler
+					process_event(event);
+				}
+			}
+		}
+	}
+
+	// cleanup
+	if (ENABLE_FEATURE_CLEAN_UP) {
+		for (i = 0; i < argc; i++)
+			close(pfd[i].fd);
+		free(pfd);
+	}
+
+	return EXIT_SUCCESS;
+}
+
+#endif
