From 750f18b9ec920fabf30d1de931b4bc7af023e4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Boisnard?= Date: Wed, 30 Oct 2013 17:30:59 +0100 Subject: Fix hostDomainGenerator socket-checking mechanism for Ubuntu 13.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BZ: 148729 The script hostDomainGenerator.sh doesn't work fine on Ubuntu 13.04. The processing is based on the external tool "ss" to monitor opened sockets, in order to check if existing instances of test-platform are currently started. It appears that the behavior of this tool is different in the latest Ubuntu release: requests of opened sockets always return multiple false results. In consequence, the script cannot find any available port to start a new test-platform instance. This patch updates the way opened sockets are checked, using "grep" instead of the "ss" filter mechanism. Change-Id: I2e1245c524d021d99389a0ec028105ed1f706666 Signed-off-by: Frédéric Boisnard --- tools/xmlGenerator/hostDomainGenerator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/xmlGenerator/hostDomainGenerator.sh b/tools/xmlGenerator/hostDomainGenerator.sh index c618f46..2e10613 100755 --- a/tools/xmlGenerator/hostDomainGenerator.sh +++ b/tools/xmlGenerator/hostDomainGenerator.sh @@ -132,7 +132,7 @@ formatConfigFile () { # Test if socket is currently used portIsInUse () { port=$1 - test $(ss -an src :${port} | wc --lines) -gt 1 + test $(ss -an | grep ":${port}" | wc --lines) -gt 0 } # The initTestPlatform starts a testPlatform instance with the config file given in argument. -- cgit v1.1