summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2018-10-25 13:26:37 +0300
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2018-10-25 13:26:37 +0300
commitb6bdc737a332cbe9e90b3c641de8abf43209838c (patch)
treea689979bf4beb866550b9d29381f6c61ca711920 /scripts
parent8a26ec281de257b2acb4221bae0d07c8af4e7522 (diff)
configure network interfaces of hosts
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/conf-net.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/conf-net.sh b/scripts/conf-net.sh
new file mode 100755
index 0000000..e7589a4
--- /dev/null
+++ b/scripts/conf-net.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. scripts/lava-common.sh
+# set hostname
+hostname $(lava-role)
+
+iface=$(find_vland_iface)
+
+# configure an ip
+# 200 hosts should be enough
+last=$(lava-self)
+last=$(((last % 200) + 1))
+ip='192.168.200.'"$last/24"
+ip addr add dev "$iface" "$ip"