~ubuntu-branches/ubuntu/maverick/pm-utils/maverick

« back to all changes in this revision

Viewing changes to debian/patches/03-on_ac_power-devkit-power.patch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl, Martin Pitt, Michael Biebl
  • Date: 2009-11-30 09:49:30 UTC
  • Revision ID: james.westby@ubuntu.com-20091130094930-zv2kwlpu5dn2mwie
Tags: 1.2.6.1-3
[ Martin Pitt ]
* Drop 01-modprobe-blacklist.patch again, that was a misunderstanding.

[ Michael Biebl ]
* Drop 03-on_ac_power-devkit-power.patch, we are using on_ac_power from
  powermgmt-base so this patch has no effect and only seems to cause
  confusion.
* debian/patches/01-have-kms-nouveau.patch
  - Fix a typo in have_kms(), the free nvidia driver is called "nouveau",
    not "noveau". Thanks to Julien Cristau for spotting this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 7e0669993909e51fa8c3ad0d1d613083a3c5122d Mon Sep 17 00:00:00 2001
2
 
From: Martin Pitt <martin.pitt@ubuntu.com>
3
 
Date: Wed, 25 Nov 2009 12:31:34 +0100
4
 
Subject: [PATCH 3/5] on_ac_power: DeviceKit-power support
5
 
 
6
 
Try to contact DeviceKit-Power in on_ac_power, and if it succeeds, use that.
7
 
Otherwise fall back to hal.
8
 
 
9
 
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25274
10
 
---
11
 
 src/on_ac_power |    9 +++++++++
12
 
 1 files changed, 9 insertions(+), 0 deletions(-)
13
 
 
14
 
diff --git a/src/on_ac_power b/src/on_ac_power
15
 
index edddf72..3a77734 100755
16
 
--- a/src/on_ac_power
17
 
+++ b/src/on_ac_power
18
 
@@ -30,6 +30,15 @@
19
 
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
 
 #
21
 
 
22
 
+# prefer DeviceKit-power if available
23
 
+if s=`dbus-send --system --print-reply --dest=org.freedesktop.DeviceKit.Power /org/freedesktop/DeviceKit/Power org.freedesktop.DBus.Properties.Get string:org.freedesktop.DeviceKit.Power string:OnBattery`; then
24
 
+    if echo "$s" | grep -q 'boolean false'; then
25
 
+       exit 0
26
 
+    else
27
 
+       exit 1
28
 
+    fi
29
 
+fi
30
 
+
31
 
 # Check for AC/DC/etc adapters
32
 
 ac_adapters="$(hal-find-by-capability --capability ac_adapter)"
33
 
 
34
 
1.6.5
35