diff --git a/install-openvswitch.sh b/install-openvswitch.sh index 4f154e3..0bad8ba 100755 --- a/install-openvswitch.sh +++ b/install-openvswitch.sh @@ -1,14 +1,16 @@ #!/usr/bin/env sh +apk update apk add openvswitch openvswitch-bash-completion bash bash-completion openvswitch-doc openvswitch-openrc vim tcpdump ruby ruby-rdoc git sed -i -e "s@mouse\=a@mouse=r@g" /usr/share/vim/vim*/defaults.vim grep "mouse=a" /usr/share/vim/vim*/defaults.vim +grep "auto switch0" /etc/network/interfaces >/dev/null RES="$?" if [ "${RES}" -gt "0" ] then -cat <> /etc/network/interfacees +cat <> /etc/network/interfaces auto eth1 iface eth1 inet manual auto eth2 @@ -55,6 +57,8 @@ auto eth22 iface eth22 inet manual auto eth23 iface eth23 inet manual +auto switch0 +iface switch0 inet manual EOF fi @@ -96,34 +100,34 @@ ovs-vsctl add-port switch0 eth22 ovs-vsctl add-port switch0 eth23 ### -ip link set dev eth1 up -ip link set dev eth2 up -ip link set dev eth3 up -ip link set dev eth4 up -ip link set dev eth5 up -ip link set dev eth6 up -ip link set dev eth7 up -ip link set dev eth8 up -ip link set dev eth9 up -ip link set dev eth10 up -ip link set dev eth11 up -ip link set dev eth12 up -ip link set dev eth13 up -ip link set dev eth14 up -ip link set dev eth15 up -ip link set dev eth16 up -ip link set dev eth17 up -ip link set dev eth18 up -ip link set dev eth19 up -ip link set dev eth20 up -ip link set dev eth21 up -ip link set dev eth22 up -ip link set dev eth23 up - +ifup eth1 +ifup eth2 +ifup eth3 +ifup eth4 +ifup eth5 +ifup eth6 +ifup eth7 +ifup eth8 +ifup eth9 +ifup eth10 +ifup eth11 +ifup eth12 +ifup eth13 +ifup eth14 +ifup eth15 +ifup eth16 +ifup eth17 +ifup eth18 +ifup eth19 +ifup eth20 +ifup eth21 +ifup eth22 +ifup eth23 +ifup switch0 ### ovs-vsctl list-br ovs-vsctl list-ports switch0 -ovs-vsctl show +ovs-vsctl show \ No newline at end of file