Merge lp:~xavi-garcia-mena/livecd-rootfs/bug-1317860-upower-poweroff-phone-only into lp:livecd-rootfs

Proposed by Xavi Garcia
Status: Merged
Merged at revision: 1350
Proposed branch: lp:~xavi-garcia-mena/livecd-rootfs/bug-1317860-upower-poweroff-phone-only
Merge into: lp:livecd-rootfs
Diff against target: 14 lines (+10/-0)
1 file modified
live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot (+10/-0)
To merge this branch: bzr merge lp:~xavi-garcia-mena/livecd-rootfs/bug-1317860-upower-poweroff-phone-only
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Oliver Grawert Approve
Review via email: mp+290454@code.launchpad.net

Commit message

Adding a new hook to change the configuration file for upower.
The new configuration uses percentages for battery levels and uses power off for the critical battery level action.

Description of the change

Adding a new hook to change the configuration file for upower.
The new configuration uses percentages for battery levels and uses power off for the critical battery level action.

To post a comment you must log in.
Revision history for this message
Oliver Grawert (ogra) wrote :

looks fine ... note that you will need this applied to the livecd-rootfs package in the phone overlay though

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hacky but, well, we've done worse. Much safer than doing that from other package installation. Merging and forwarding to overlay-ppa as well.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot'
2--- live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot 1970-01-01 00:00:00 +0000
3+++ live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot 2016-03-30 13:12:24 +0000
4@@ -0,0 +1,10 @@
5+#! /bin/sh
6+
7+set -e
8+
9+echo "Updating upower configuration..."
10+
11+sed -i 's/^UsePercentageForPolicy=.*/UsePercentageForPolicy=true/' /etc/UPower/UPower.conf
12+sed -i 's/^CriticalPowerAction=.*/CriticalPowerAction=PowerOff/' /etc/UPower/UPower.conf
13+
14+

Subscribers

People subscribed via source and target branches