aboutsummaryrefslogtreecommitdiffstats
path: root/common/scripts
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-04-20 19:31:48 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-05-05 15:08:11 +0200
commit4cd7c4dad0ab150402fe250a13ddc2b9b09e0ce8 (patch)
tree0618d5534f09f00e820d3db4449ccd2f0f88cfe4 /common/scripts
parent0b9024b64a33bd6e89c4a4308db94fbd5aa0120b (diff)
Use fallback IPs for pyartiproxy.
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Change-Id: Ia31e5a29e46ee4fca45b4d8ddd8e8cd8e7347133
Diffstat (limited to 'common/scripts')
-rwxr-xr-xcommon/scripts/artiproxy-upload.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/common/scripts/artiproxy-upload.sh b/common/scripts/artiproxy-upload.sh
index c4b7dbe..0e841d8 100755
--- a/common/scripts/artiproxy-upload.sh
+++ b/common/scripts/artiproxy-upload.sh
@@ -1,11 +1,21 @@
#!/bin/sh
if [ -z "$PYARTIPROXY_IP" ];then
- #echo "ERROR: cannot upload, no PYARTIPROXY_IP"
- #exit 1
- # TODO: lab-baylibre-agl does not get env as it should be. I will debug this later.
- echo "DEBUG: No PYARTIPROXY_IP variable, fallback to baylibre one"
- PYARTIPROXY_IP=10.1.1.47
+
+ echo "DEBUG: No PYARTIPROXY_IP variable, using fallbacks"
+ BAYLIBRE_IP=10.1.1.47
+ AGLCORELAB_IP=192.168.111.1
+
+ if ping -q -W 2 -4 -c 1 $BAYLIBRE_IP ; then
+ PYARTIPROXY_IP=$BAYLIBRE_IP
+ fi
+ if ping -q -W 2 -4 -c 1 $AGLCORELAB_IP ; then
+ PYARTIPROXY_IP=$AGLCORELAB_IP
+ fi
+ if [ -z $PYARTIPROXY_IP ] ; then
+ echo "ERROR: no PYARTIPROXY_IP"
+ exit 1
+ fi
fi
if [ -z "$1" ];then