~townsend/unity8-preview-lxc/fix-proc-automount

« back to all changes in this revision

Viewing changes to bin/unity8-lxc-compositor

  • Committer: CI Train Bot
  • Author(s): Chris Townsend
  • Date: 2015-03-05 14:48:04 UTC
  • mfrom: (45.3.2 fix-wait-for-lxc-start)
  • Revision ID: ci-train-bot@canonical.com-20150305144804-szp9pl73n334qsip
Add an lxc-wait after lxc-start to make sure the container is actually running before proceeding to the lxc-attach.  Also, have to add an additional half second sleep to account for an lxc race where lxc-wait reports the container is running when in reality, it may not be. Fixes: #1425663
Approved by: Stephen M. Webb

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
trap kill_unity_system_compositor TERM EXIT
37
37
 
38
 
lxc-wait -t 0 -s RUNNING -n $CONTAINER_NAME || lxc-start -n $CONTAINER_NAME -d
 
38
lxc-wait -t 0 -s RUNNING -n $CONTAINER_NAME || lxc-start -n $CONTAINER_NAME -d && \
 
39
  lxc-wait -t 5 -s RUNNING -n $CONTAINER_NAME && sleep 0.5
39
40
 
40
41
lxc-attach -n $CONTAINER_NAME -- /usr/sbin/unity-system-compositor.sleep $* &
41
42