Patchwork [bitbake-devel,5/9] toaster: startup script noweb mode

login
register
mail settings
Submitter Alexandru DAMIAN
Date June 3, 2014, 3:26 p.m.
Message ID <6bbeb6b2f80e13d763e8ff2247a37259951046f0.1401808899.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/73153/
State New
Headers show

Comments

Alexandru DAMIAN - June 3, 2014, 3:26 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

We add an option to the startup script, named "noweb" that
will start toaster without the embedded web server.

This is useful to start the system for build-only environments,
where the web server code is running on a different machine.

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

Patch

diff --git a/bin/toaster b/bin/toaster
index dea69a4..f81e667 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -146,11 +146,15 @@  else
 fi
 
 NOTOASTERUI=0
+WEBSERVER=1
 for param in $*; do
     case $param in
     noui )
             NOTOASTERUI=1
     ;;
+    noweb )
+            WEBSERVER=0
+    ;;
     esac
 done
 
@@ -176,7 +180,7 @@  case $CMD in
     start )
         start_success=1
         addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
-        if ! webserverStartAll; then
+        if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
             echo "Failed ${CMD}."
             return 4
         fi