1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

eee-acpi-scripts: Initial commit

eeePC specific ACPI hooks.


git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5272 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Samuel Ortiz
2008-09-25 14:58:13 +00:00
parent d3636b1f0c
commit 4a91a284b5
3 changed files with 103 additions and 0 deletions
@@ -0,0 +1,35 @@
SECTION = "base"
DESCRIPTION = "eeePC specific ACPI scripts"
LICENSE="GPL"
SRCREV = "df785afdacedf869b20fb88a793c13b539819270"
PR = "r2"
RDEPENDS = "pm-utils"
SRC_URI = "git://git.debian.org/git/debian-eeepc/eeepc-acpi-scripts.git;protocol=git \
file://remove-doc-check.patch;patch=1 \
file://policy-funcs "
S = "${WORKDIR}/git"
FILES_${PN} = "${datadir}/acpi-support/ \
${datadir}/eeepc-acpi-scripts \
${sysconfdir}/default/ \
${sysconfdir}/acpi/"
do_install () {
install -d ${D}${sysconfdir}/default/
install -d ${D}${sysconfdir}/acpi/actions/
install -d ${D}${sysconfdir}/acpi/events/
install -d ${D}${sysconfdir}/acpi/lib/
install -d ${D}${datadir}/eeepc-acpi-scripts/
install -d ${D}${datadir}/acpi-support/
install -m 644 ${S}/events/* ${D}${sysconfdir}/acpi/events/
install -m 644 ${S}/lib/* ${D}${sysconfdir}/acpi/lib/
install ${S}/actions/* ${D}${sysconfdir}/acpi/actions/
install -m 0644 ${S}/functions.sh ${D}${datadir}/eeepc-acpi-scripts/
install -m 0644 ${WORKDIR}/policy-funcs ${D}${datadir}/acpi-support/
install -m 0644 ${S}/debian/eeepc-acpi-scripts.default ${D}${sysconfdir}/default/
}
@@ -0,0 +1,8 @@
CheckPolicy() {
if pidof gnome-power-manager kpowersave > /dev/null ||
(pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) ; then
echo 0;
else
echo 1;
fi
}
@@ -0,0 +1,60 @@
---
actions/hotkey.sh | 3 ---
actions/suspend.sh | 3 ---
actions/vga-toggle.sh | 3 ---
actions/volume.sh | 3 ---
4 files changed, 12 deletions(-)
Index: git/actions/hotkey.sh
===================================================================
--- git.orig/actions/hotkey.sh 2008-09-25 11:00:58.000000000 +0200
+++ git/actions/hotkey.sh 2008-09-25 11:01:04.000000000 +0200
@@ -1,8 +1,5 @@
#!/bin/sh
-# do nothing if package is removed
-[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0
-
. /etc/default/eeepc-acpi-scripts
. /usr/share/eeepc-acpi-scripts/functions.sh
. /etc/acpi/lib/notify.sh
Index: git/actions/suspend.sh
===================================================================
--- git.orig/actions/suspend.sh 2008-09-25 11:00:32.000000000 +0200
+++ git/actions/suspend.sh 2008-09-25 11:00:37.000000000 +0200
@@ -1,8 +1,5 @@
#!/bin/sh
-# do nothing if package is removed
-[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0
-
if (runlevel | grep -q [06]) || (pidof '/sbin/shutdown' > /dev/null); then
exit 0
fi
Index: git/actions/vga-toggle.sh
===================================================================
--- git.orig/actions/vga-toggle.sh 2008-09-25 11:02:00.000000000 +0200
+++ git/actions/vga-toggle.sh 2008-09-25 11:02:06.000000000 +0200
@@ -1,8 +1,5 @@
#!/bin/sh
-# do nothing if package is removed
-[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0
-
. /etc/default/eeepc-acpi-scripts
# return: 0 on disconnect, 1 on connected vga, 2 else
Index: git/actions/volume.sh
===================================================================
--- git.orig/actions/volume.sh 2008-09-25 11:02:13.000000000 +0200
+++ git/actions/volume.sh 2008-09-25 11:02:19.000000000 +0200
@@ -2,9 +2,6 @@
# Volume controls
-# do nothing if package is removed
-[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0
-
. /etc/default/eeepc-acpi-scripts
. /usr/share/eeepc-acpi-scripts/functions.sh
. /etc/acpi/lib/notify.sh