Merge "Fix mdsal distribution-check neon clone branch"
[releng/builder.git] / jenkins-scripts / mininet-ubuntu.sh
index ef53a1f8f30ef6066afafa1acb80c4bbed7f9f12..7f0cd569ef76c7f4bed431f669c4d8b37ca3a4f6 100755 (executable)
@@ -9,8 +9,8 @@ EOF
 # disable the firewall
 /bin/bash ./disable_firewall.sh
 
-# Install vlan for vlan based tests in VTN suites
-apt-get install -y --force-yes -qq vlan
-
-# Install netaddr package which is needed by some custom mininet topologies
-apt-get install python-netaddr
\ No newline at end of file
+# Add 'hostname' into /etc/hosts during node spinup time to avoid sudo returning
+# an 'unable to resolve host' message or some Java API's returning an unknown
+# host exception. The workaround on adding "myhostname" into /etc/nss-switch.conf
+# does not work on Ubuntu flavours.
+sed -i "/127.0.0.1/s/$/\t$(hostname)/" /etc/hosts