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

Proposed by Xavi Garcia on 2016-03-30
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 on 2016-03-30
Oliver Grawert 2016-03-30 Approve on 2016-03-30
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.
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
Ł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
=== added file 'live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot'
--- live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot 1970-01-01 00:00:00 +0000
+++ live-build/ubuntu-touch/hooks/50-upower-poweroff-percentages.chroot 2016-03-30 13:12:24 +0000
@@ -0,0 +1,10 @@
1#! /bin/sh
2
3set -e
4
5echo "Updating upower configuration..."
6
7sed -i 's/^UsePercentageForPolicy=.*/UsePercentageForPolicy=true/' /etc/UPower/UPower.conf
8sed -i 's/^CriticalPowerAction=.*/CriticalPowerAction=PowerOff/' /etc/UPower/UPower.conf
9
10

Subscribers

People subscribed via source and target branches