blob: 5a65fa18579531fee83c3c36b1bf1e235f6ea4bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
|