fix apmwrapper to make suspend/resume also work on CXK
authorMichael Lauer <mickey@vanille-media.de>
Sat, 23 Apr 2005 19:34:32 +0000 (19:34 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Sat, 23 Apr 2005 19:34:32 +0000 (19:34 +0000)
BKrev: 426aa348a49iwgXpP36A0c7zH6ENHw

packages/apmd/apmd-3.2.2/apmwrapper
packages/apmd/apmd_3.2.2.bb

index e69de29..3bc9bec 100644 (file)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if ( cat /proc/cpuinfo|grep -i hardware|grep -i SHARP ) && \
+   [ ".$@" = ".-s" -o ".$@" = ".--suspend" ]; then
+       killall -USR1 apmd || /usr/bin/apm.orig -s
+else
+       /usr/bin/apm.orig "$@"
+fi
+
index 9efd794..7047ff9 100644 (file)
@@ -1,15 +1,9 @@
-PR = "r2"
+DESCRIPTION = "Set of tools for managing notebook power consumption."
 SECTION = "base"
 PRIORITY = "required"
 DEPENDS = "libtool-cross"
-DESCRIPTION = "Set of tools for managing notebook power consumption."
-LICENSE="GPL"
-
-PACKAGES =+ "libapm libapm-dev apm"
-
-FILES_libapm = "${libdir}/libapm.so.*"
-FILES_libapm-dev = "${libdir}/libapm.* ${includedir}"
-FILES_apm = "${bindir}/apm*"
+LICENSE = "GPL"
+PR = "r3"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.orig.tar.gz; \
            file://debian.patch;patch=1 \
@@ -63,3 +57,11 @@ do_install() {
        cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd
        chmod 755 ${D}${sysconfdir}/init.d/apmd
 }
+
+PACKAGES =+ "libapm libapm-dev apm"
+
+FILES_libapm = "${libdir}/libapm.so.*"
+FILES_libapm-dev = "${libdir}/libapm.* ${includedir}"
+FILES_apm = "${bindir}/apm*"
+
+