~narindergupta/opnfv/stable-R2

« back to all changes in this revision

Viewing changes to ci/onos/cloud-sh-onos/lxc-network.sh

  • Committer: zhangyuanyou
  • Date: 2016-01-02 08:55:55 UTC
  • Revision ID: git-v1:9d5ca8b6a6c9e33a5f8318483ad940eb9918819d
JOID-18 Juju integration with ONOSFW.

Change-Id: Iaffdb78ceb5a4c1a57fce3459289c65d6b6a4f42

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
DEBIAN_FRONTEND=noninteractive apt-get -qy -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install lxc < /dev/null
 
4
 
 
5
sed -e 's/^USE_LXC_BRIDGE="true"/USE_LXC_BRIDGE="false"/' -i /etc/default/lxc
 
6
service lxc-net restart
 
7
 
 
8
ifdown eth0
 
9
mv /etc/network/interfaces.d/eth0.cfg /etc/network/interfaces.d/eth0.cfg.bak
 
10
cat <<-"EOF" > /etc/network/interfaces.d/bridge.cfg
 
11
        auto eth0
 
12
        iface eth0 inet manual
 
13
 
 
14
        auto lxcbr0
 
15
        iface lxcbr0 inet dhcp
 
16
            bridge_ports eth0
 
17
        EOF
 
18
ifup eth0 lxcbr0