Merge lp:~ondrak/lxc-android-config/fix_1551150 into lp:lxc-android-config

Proposed by Ondrej Kubik
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: 21
Merged at revision: 21
Proposed branch: lp:~ondrak/lxc-android-config/fix_1551150
Merge into: lp:lxc-android-config
Diff against target: 50 lines (+18/-9)
1 file modified
debian/lxc-android-config.upstart (+18/-9)
To merge this branch: bzr merge lp:~ondrak/lxc-android-config/fix_1551150
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Review via email: mp+297622@code.launchpad.net

Commit message

Updating lxc-android-config to work with new lxc v2.0. This fixes boot of devel-proposed (Xenial) channel (LP: #1551150)

Description of the change

Updating lxc-android-config to work with new lxc v2.0

This fixes boot of devel-proposed (Xenial) channel

bug: https://bugs.launchpad.net/bugs/1551150

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/lxc-android-config.upstart'
2--- debian/lxc-android-config.upstart 2015-09-02 07:50:44 +0000
3+++ debian/lxc-android-config.upstart 2016-06-16 12:56:07 +0000
4@@ -2,21 +2,23 @@
5 #
6 # Configure and initialize the Android container for Ubuntu Touch
7
8-description "lxc android config and container initialization"
9+description "lxc android config and container initialization"
10
11-start on cgmanager-ready
12+start on cgmanager-ready and started cgroup-lite
13 stop on runlevel [06]
14
15-emits android
16-
17-console none
18-
19-exec lxc-start -n android -F -- /init
20+pre-start script
21+ if [ ! -d /sys/fs/cgroup/systemd ]; then
22+ mkdir -p /sys/fs/cgroup/systemd
23+ mount -t cgroup cgroup /sys/fs/cgroup/systemd -o name=systemd
24+ fi
25+end script
26+
27+exec lxc-start -n android -d -- /init
28
29 post-start script
30 if [ ! -d /dev/cpuctl ] && [ -d /sys/fs/cgroup/cpu ]; then
31- mkdir /dev/cpuctl
32- mount -t cgroup -o cpu none /sys/fs/cgroup/cpu
33+ ln -s /sys/fs/cgroup/cpu /dev/cpuctl
34 fi
35
36 lxc-wait -n android -s RUNNING -t 30
37@@ -35,6 +37,13 @@
38 done
39 fi
40
41+ # Hide all the cgroups again
42+ stop cgroup-lite
43+ if [ -d /sys/fs/cgroup/systemd ]; then
44+ umount /sys/fs/cgroup/systemd
45+ rmdir /sys/fs/cgroup/systemd
46+ fi
47+
48 initctl emit android
49 else
50 stop; exit 1

Subscribers

People subscribed via source and target branches