summaryrefslogtreecommitdiffstats
path: root/ci/onos/cloud-sh-onos/lxc-network.sh
diff options
context:
space:
mode:
authorzhangyuanyou <zhangyuanyou@huawei.com>2015-12-31 12:02:15 +0800
committerzhangyuanyou <zhangyuanyou@huawei.com>2016-01-02 16:55:55 +0800
commit9d5ca8b6a6c9e33a5f8318483ad940eb9918819d (patch)
treee0b626560f05fcc354dcf5704a8d121de39975b1 /ci/onos/cloud-sh-onos/lxc-network.sh
parent5a6b66ee8cb3522d3858249f090448cf6d47c326 (diff)
JOID-18 Juju integration with ONOSFW.
Change-Id: Iaffdb78ceb5a4c1a57fce3459289c65d6b6a4f42
Diffstat (limited to 'ci/onos/cloud-sh-onos/lxc-network.sh')
-rw-r--r--ci/onos/cloud-sh-onos/lxc-network.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/ci/onos/cloud-sh-onos/lxc-network.sh b/ci/onos/cloud-sh-onos/lxc-network.sh
new file mode 100644
index 00000000..5a65fa18
--- /dev/null
+++ b/ci/onos/cloud-sh-onos/lxc-network.sh
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+DEBIAN_FRONTEND=noninteractive apt-get -qy -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install lxc < /dev/null
+
+sed -e 's/^USE_LXC_BRIDGE="true"/USE_LXC_BRIDGE="false"/' -i /etc/default/lxc
+service lxc-net restart
+
+ifdown eth0
+mv /etc/network/interfaces.d/eth0.cfg /etc/network/interfaces.d/eth0.cfg.bak
+cat <<-"EOF" > /etc/network/interfaces.d/bridge.cfg
+ auto eth0
+ iface eth0 inet manual
+
+ auto lxcbr0
+ iface lxcbr0 inet dhcp
+ bridge_ports eth0
+ EOF
+ifup eth0 lxcbr0