aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hacking-session-debian.yaml1
-rwxr-xr-xinvoke_session_debian9
2 files changed, 7 insertions, 3 deletions
diff --git a/hacking-session-debian.yaml b/hacking-session-debian.yaml
index c39f65b..c8be181 100644
--- a/hacking-session-debian.yaml
+++ b/hacking-session-debian.yaml
@@ -6,7 +6,6 @@ metadata:
params:
PUB_KEY: None
- GATEWAY: 10.0.0.1
install:
deps:
diff --git a/invoke_session_debian b/invoke_session_debian
index e71189d..10e72e5 100755
--- a/invoke_session_debian
+++ b/invoke_session_debian
@@ -1,8 +1,13 @@
#!/bin/bash
# Usage ./invoke_session <gateway>
-# Hack for now until lava-test-shell is smart enough to know it's dispatcher ip
-gateway=$1
+# If gateway isn't set we will guess it based on the default route
+if [ -z "$1" ]; then
+ gateway=`ip route get 8.8.8.8 | cut -d ' ' -f3`
+else
+ gateway=$1
+fi
+
echo "Target's Gateway: $gateway"
if ! grep 'invoke_session' /etc/rc.local