compass-core/regtest/prepare.sh
xiaodongwang 74f1bc08a4 add regtest framework
Change-Id: Iee78d5445f1c8e2687e527d3505a191074d69776
2014-04-02 15:07:45 -07:00

15 lines
382 B
Bash

#!/bin/bash -x
# create a bridge named 'installation' so that compass and pxeboot vm are in the
# same l2 network.
brctl show |grep installation > /dev/null
if [[ $? -eq 0 ]] ; then
echo "bridge already exists"
else
brctl addbr installation
brctl addif installation eth1
fi
ifconfig installation 172.16.0.1 broadcast 172.16.0.0 netmask 255.255.0.0 up
ifconfig eth1 up