[bitbake-devel] [PATCH 02/11] toaster: check if address:port is in use

Elliot Smith elliot.smith at intel.com
Thu Dec 17 16:48:47 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

Used new management command checksocket to check if
Toaster can listen on address:port.

[YOCTO #8775]

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bin/toaster | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/toaster b/bin/toaster
index 1c1e029..f43bcb1 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -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
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list