summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrédéric Boisnard <fredericx.boisnard@intel.com>2013-10-30 17:30:59 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:04:11 +0100
commit750f18b9ec920fabf30d1de931b4bc7af023e4d8 (patch)
tree265689fea9cefb6af3ef5185acb8f4239742c4fa /tools
parentbfb0f000d770137f6c1fec3a046621057738c315 (diff)
downloadexternal_parameter-framework-750f18b9ec920fabf30d1de931b4bc7af023e4d8.zip
external_parameter-framework-750f18b9ec920fabf30d1de931b4bc7af023e4d8.tar.gz
external_parameter-framework-750f18b9ec920fabf30d1de931b4bc7af023e4d8.tar.bz2
Fix hostDomainGenerator socket-checking mechanism for Ubuntu 13.04
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 <fredericx.boisnard@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/xmlGenerator/hostDomainGenerator.sh2
1 files changed, 1 insertions, 1 deletions
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.