X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-agl-profile-graphical%2Frecipes-graphics%2Fwayland%2Fweston-ready%2Fweston-ready;h=c7cba3043e1b728d8c866397c82f544d49ac71b3;hb=refs%2Fchanges%2F31%2F19931%2F3;hp=5a3ff5500b1a7ed3b91c7448a83b6de788a9143f;hpb=60873f9da578054e029208ad64da14d2ceeccbbc;p=AGL%2Fmeta-agl.git diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready index 5a3ff5500..c7cba3043 100644 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready @@ -23,6 +23,8 @@ usage="Usage: weston-ready [-t timeout]" timeout=0 +function info() { echo "$@" >&2; } + if [ $# -eq 2 ]; then if [ $1 = "-t" ]; then timeout=$(($2 * 10)) @@ -32,15 +34,20 @@ if [ $# -eq 2 ]; then fi fi +info "using timeout $timeout" + time=0 rc=1 while true; do if [ $time -gt $timeout ]; then + info "Timeout reached" break elif LayerManagerControl get screens >/dev/null 2>&1; then + info "Weston is now ready" rc=0 break fi + info "waiting..." if [ $timeout -gt 0 ]; then usleep 500000 fi