]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: check if address:port is in use
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 17 Dec 2015 16:48:47 +0000 (16:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Dec 2015 13:51:53 +0000 (13:51 +0000)
Used new management command checksocket to check if
Toaster can listen on address:port.

[YOCTO #8775]

(Bitbake rev: 8a306ffe5a3642fe833c875362a183096a39f641)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/toaster

index 1c1e02983837e87eea40e06b686a5db1da06c36b..f43bcb167ecf364480105a0d58322723e0cbdd8f 100755 (executable)
@@ -309,6 +309,11 @@ fi
 
 echo "The system will $CMD."
 
+# check if addr:port is not in use
+if [ "$CMD" == 'start' ]; then
+    python $BBBASEDIR/lib/toaster/manage.py checksocket "0.0.0.0:$WEB_PORT" || return 1
+fi
+
 # Make sure it's safe to run by checking bitbake lock
 
 lock=1