aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-08-18 19:52:58 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-18 19:52:58 +0000
commit94dbf79b4bb7fd4c2970aec8593ba4a33cdbb6c4 (patch)
tree8b08c79307980212e4d9e7107b099613ef69144e /main/busybox-initscripts
parentd03ad6f9292bdc62226897db4c93e9a435cbe2f7 (diff)
downloadaports-94dbf79b4bb7fd4c2970aec8593ba4a33cdbb6c4.tar.bz2
aports-94dbf79b4bb7fd4c2970aec8593ba4a33cdbb6c4.tar.xz
main/busybox-initscripts: added acpid init.d script
and default acpi script for poweroff
Diffstat (limited to 'main/busybox-initscripts')
-rw-r--r--main/busybox-initscripts/APKBUILD22
-rw-r--r--main/busybox-initscripts/acpid.initd20
2 files changed, 35 insertions, 7 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD
index 7ab2e33329..83e145aa0a 100644
--- a/main/busybox-initscripts/APKBUILD
+++ b/main/busybox-initscripts/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
pkgver=2.0
-pkgrel=4
+pkgrel=5
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
license="GPL-2"
@@ -10,17 +10,18 @@ depends="busybox"
makedepends=
install=$pkgname.post-install
subpackages=
-source="cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd
+source="acpid.initd cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd
mdev-mount.initd mdev.initd rdate.initd syslog.initd watchdog.initd
cron.confd klogd.confd rdate.confd syslog.confd watchdog.confd
mdev.conf dvbdev ide_links usbdev usbdisk_link
- $install"
+ "
build() {
local i
cd "$srcdir"
- mkdir -p "$pkgdir"/etc/conf.d "$pkgdir"/etc/init.d "$pkgdir"/lib/mdev
+ mkdir -p "$pkgdir"/etc/conf.d "$pkgdir"/etc/init.d "$pkgdir"/lib/mdev\
+ "$pkgdir"/etc/acpi/PWRF
for i in *.initd; do
install -m755 "$srcdir"/$i "$pkgdir"/etc/init.d/${i%.*} || return 1
done
@@ -29,9 +30,17 @@ build() {
done
install -m644 mdev.conf "$pkgdir"/etc
install -m755 dvbdev ide_links usbdev usbdisk_link "$pkgdir"/lib/mdev/
+
+ # poweroff script for acpid
+ cat >"$pkgdir"/etc/acpi/PWRF/00000080 <<EOF
+#!/bin/sh
+poweroff
+EOF
+
}
-md5sums="131e46b2853439f436bc377a5473273f cron.initd
+md5sums="baa44c026a4c9468b01ec2771d76db19 acpid.initd
+131e46b2853439f436bc377a5473273f cron.initd
3af526f4de1a607f7932a15f7c8e8eb1 dnsd.initd
f7daf05f9984aa398fdbd3fe02e82678 httpd.initd
dad8e381142dfb42483de324aff4cf28 inetd.initd
@@ -50,5 +59,4 @@ b5b23dd06cea120bd8d850b54bca0b59 syslog.initd
ad1556961294e4aa2abca6be52138b7c dvbdev
5c8725b4cbdeda23b00f08124a0d20bf ide_links
1acfd58dfd1cf324c90ca3a3be519510 usbdev
-30b0c85956b6701caf55309a17e537f6 usbdisk_link
-038db8453f57a36afaee2a4d883008e4 busybox-initscripts.post-install"
+30b0c85956b6701caf55309a17e537f6 usbdisk_link"
diff --git a/main/busybox-initscripts/acpid.initd b/main/busybox-initscripts/acpid.initd
new file mode 100644
index 0000000000..548d4ba404
--- /dev/null
+++ b/main/busybox-initscripts/acpid.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need dev
+ after hwdrivers modules
+}
+
+start() {
+ ebegin "Starting busybox acpid"
+ start-stop-daemon --start --exec /sbin/acpid \
+ -- $ACPID_OPTS
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping busybox acpid"
+ start-stop-daemon --stop --exec /sbin/acpid
+ eend $?
+}
+