1
# lxc-android-config - LXC Android Config and Container Initialization
3
# Configure and initialize the Android container for Ubuntu Touch
5
description "lxc android config and container initialization"
7
start on cgmanager-ready
14
exec lxc-start -n android -F -- /init
17
if [ ! -d /dev/cpuctl ] && [ -d /sys/fs/cgroup/cpu ]; then
19
mount -t cgroup -o cpu none /sys/fs/cgroup/cpu
22
lxc-wait -n android -s RUNNING -t 30
23
containerpid="$(lxc-info -n android -p -H)"
24
if [ -n "$containerpid" ]; then
26
[ -f /proc/$containerpid/root/dev/.coldboot_done ] && break
30
# Allow custom properties before announcing that the boot is completed
31
if [ -f /custom/custom.prop ]; then
32
while [ ! -e /dev/socket/property_service ]; do sleep 0.1; done
33
grep "^custom\." /custom/custom.prop | sed 's/=/ /' | while read property value; do
34
setprop $property $value
44
pre-stop exec lxc-stop -n android -k