summaryrefslogtreecommitdiff
path: root/start-container-docker.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-06-26 06:58:31 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-06-26 14:21:00 +0000
commit4199801c5ebf733a0479d872d9ef4bf3f2362f48 (patch)
tree73947f315fcae636e97b1b5b179b03d3c045f905 /start-container-docker.sh
parentded788405cf388227f6932e678e52f60e01e3140 (diff)
start-container-docker.sh: Use FQDN to ssh to local container.
For VPN'ed machines FQDN ends with .tcwglab, which is exactly what we want. For external machines we have entries in .ssh/config with connection details. Change-Id: I9e53ce8d2ba4fd6c25d760ce890d898f96dbe27a
Diffstat (limited to 'start-container-docker.sh')
-rwxr-xr-xstart-container-docker.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh
index ce3014ae..fc3b1f05 100755
--- a/start-container-docker.sh
+++ b/start-container-docker.sh
@@ -160,7 +160,9 @@ if [ x"$node" != x"" ]; then
fi
if [ x"$session_host" = x"" ]; then
- session_host=localhost
+ # Get first FQDN. This name needs to have .tcwglab suffix for VPN'ed
+ # machines and entries in .ssh/config for external machines.
+ session_host=$(hostname -A | cut -d" " -f 1)
fi
if [ x"${container_arch}" = x"default" ]; then