[bitbake-devel] [PATCH 19/22] toaster: enable no browser start

Alex DAMIAN alexandru.damian at intel.com
Thu May 28 14:14:13 UTC 2015


From: Alexandru DAMIAN <alexandru.damian at intel.com>

We enable a "nobrowser" parameter that inhibits
the launch of a browser when toaster starts.

This is useful for integration with automated startup scripts
and enables headless testing.

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 bin/toaster | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/toaster b/bin/toaster
index 93abcfa..ee19937 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -154,6 +154,7 @@ NOTOASTERUI=0
 WEBSERVER=1
 TOASTER_BRBE=""
 WEB_PORT="8000"
+NOBROWSER=0
 
 for param in $*; do
     case $param in
@@ -163,6 +164,9 @@ for param in $*; do
     noweb )
             WEBSERVER=0
     ;;
+    nobrowser )
+            NOBROWSER=1
+    ;;
     brbe=* )
             TOASTER_BRBE=$'\n'"TOASTER_BRBE=\""${param#*=}"\""
     ;;
@@ -227,7 +231,7 @@ if [ `basename \"$0\"` = `basename \"${SRCFILE}\"` ]; then
         cleanup
         exit 1
     fi
-    if [ $WEBSERVER -gt 0 ]; then
+    if [ $WEBSERVER -gt 0 ] && [ $NOBROWSER -eq 0 ]  ; then
         echo "Starting browser..."
         xdg-open http://127.0.0.1:$WEB_PORT/ >/dev/null 2>&1 &
     fi
-- 
1.9.1




More information about the bitbake-devel mailing list