acpid: use busybox acpid and add poweroff script

Import sysvinit scripts from LP: #944141 [Lance Albertson], and enable acpi in
busybox rather than the acpid package in buildroot.

LP: #944151
This commit is contained in:
Scott Moser
2012-06-08 11:03:39 -04:00
parent a5aa6d490d
commit ed5aa12a62
6 changed files with 30 additions and 4 deletions

View File

@@ -384,7 +384,7 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.18.x.config"
#
# Hardware handling
#
BR2_PACKAGE_ACPID=y
# BR2_PACKAGE_ACPID is not set
# BR2_PACKAGE_CDRKIT is not set
# BR2_PACKAGE_CRAMFS is not set
# BR2_PACKAGE_DBUS is not set

View File

@@ -365,7 +365,7 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-1.18.x.config"
#
# Hardware handling
#
BR2_PACKAGE_ACPID=y
# BR2_PACKAGE_ACPID is not set
# BR2_PACKAGE_CDRKIT is not set
# BR2_PACKAGE_CRAMFS is not set
# BR2_PACKAGE_DBUS is not set

View File

@@ -533,8 +533,8 @@ CONFIG_FEATURE_MDEV_CONF=y
CONFIG_FEATURE_MDEV_EXEC=y
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
# CONFIG_REV is not set
# CONFIG_ACPID is not set
# CONFIG_FEATURE_ACPID_COMPAT is not set
CONFIG_ACPID=y
CONFIG_FEATURE_ACPID_COMPAT=y
# CONFIG_BLKID is not set
# CONFIG_FEATURE_BLKID_TYPE is not set
CONFIG_DMESG=y

3
src/etc/acpi/PWRF/00000080 Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
exec /sbin/poweroff

22
src/etc/init.d/acpid Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
# acpid
case "$1" in
start)
echo -n "Starting acpid: "
start-stop-daemon -S -q -p /var/run/acpid.pid --exec /sbin/acpid
echo "OK"
;;
stop|restart|reload)
echo -n "Stopping acpid: "
start-stop-daemon -K -q -p /var/run/acpid.pid
echo "OK"
;;
*)
echo $"Usage: $0 {start}"
exit 1
esac
exit $?
# vi: ts=4 noexpandtab

1
src/etc/rc3.d/S21-acpid Symbolic link
View File

@@ -0,0 +1 @@
../init.d/acpid