]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: set TOASTER_MANAGED variable
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 15 Oct 2015 16:34:16 +0000 (09:34 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Oct 2015 13:07:29 +0000 (14:07 +0100)
Set TOASTER_MANAGED to 1 if toaster is run as a script.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/toaster

index d7c5a845e485bd0ef8926a515f4e03d41b462735..cf93e9fd98931cf04864470832fb72a9643bad29 100755 (executable)
@@ -176,6 +176,8 @@ else
     TOASTER=$0
 fi
 
+[ `basename \"$0\"` = `basename \"${TOASTER}\"` ] && TOASTER_MANAGED=1
+
 BBBASEDIR=`dirname $TOASTER`/..
 
 RUNNING=0
@@ -232,7 +234,7 @@ for param in $*; do
     esac
 done
 
-if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then
+if [ "$TOASTER_MANAGED" = '1' ]; then
     # We are called as standalone. We refuse to run in a build environment - we need the interactive mode for that.
     # Start just the web server, point the web browser to the interface, and start any Django services.
 
@@ -279,7 +281,6 @@ if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then
             do_cleanup
         fi
     }
-    TOASTER_MANAGED=1
     export TOASTER_MANAGED=1
     if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
         echo "Failed to start the web server, stopping" 1>&2