Update install-openvswitch.sh
This commit is contained in:
parent
8098b37f6f
commit
466f3e4a3c
@ -1,14 +1,16 @@
|
|||||||
#!/usr/bin/env sh
|
#!/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
|
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
|
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 "mouse=a" /usr/share/vim/vim*/defaults.vim
|
||||||
|
|
||||||
|
grep "auto switch0" /etc/network/interfaces >/dev/null
|
||||||
RES="$?"
|
RES="$?"
|
||||||
|
|
||||||
if [ "${RES}" -gt "0" ]
|
if [ "${RES}" -gt "0" ]
|
||||||
then
|
then
|
||||||
cat <<EOF >> /etc/network/interfacees
|
cat <<EOF >> /etc/network/interfaces
|
||||||
auto eth1
|
auto eth1
|
||||||
iface eth1 inet manual
|
iface eth1 inet manual
|
||||||
auto eth2
|
auto eth2
|
||||||
@ -55,6 +57,8 @@ auto eth22
|
|||||||
iface eth22 inet manual
|
iface eth22 inet manual
|
||||||
auto eth23
|
auto eth23
|
||||||
iface eth23 inet manual
|
iface eth23 inet manual
|
||||||
|
auto switch0
|
||||||
|
iface switch0 inet manual
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -96,34 +100,34 @@ ovs-vsctl add-port switch0 eth22
|
|||||||
ovs-vsctl add-port switch0 eth23
|
ovs-vsctl add-port switch0 eth23
|
||||||
|
|
||||||
###
|
###
|
||||||
ip link set dev eth1 up
|
ifup eth1
|
||||||
ip link set dev eth2 up
|
ifup eth2
|
||||||
ip link set dev eth3 up
|
ifup eth3
|
||||||
ip link set dev eth4 up
|
ifup eth4
|
||||||
ip link set dev eth5 up
|
ifup eth5
|
||||||
ip link set dev eth6 up
|
ifup eth6
|
||||||
ip link set dev eth7 up
|
ifup eth7
|
||||||
ip link set dev eth8 up
|
ifup eth8
|
||||||
ip link set dev eth9 up
|
ifup eth9
|
||||||
ip link set dev eth10 up
|
ifup eth10
|
||||||
ip link set dev eth11 up
|
ifup eth11
|
||||||
ip link set dev eth12 up
|
ifup eth12
|
||||||
ip link set dev eth13 up
|
ifup eth13
|
||||||
ip link set dev eth14 up
|
ifup eth14
|
||||||
ip link set dev eth15 up
|
ifup eth15
|
||||||
ip link set dev eth16 up
|
ifup eth16
|
||||||
ip link set dev eth17 up
|
ifup eth17
|
||||||
ip link set dev eth18 up
|
ifup eth18
|
||||||
ip link set dev eth19 up
|
ifup eth19
|
||||||
ip link set dev eth20 up
|
ifup eth20
|
||||||
ip link set dev eth21 up
|
ifup eth21
|
||||||
ip link set dev eth22 up
|
ifup eth22
|
||||||
ip link set dev eth23 up
|
ifup eth23
|
||||||
|
ifup switch0
|
||||||
|
|
||||||
###
|
###
|
||||||
ovs-vsctl list-br
|
ovs-vsctl list-br
|
||||||
|
|
||||||
ovs-vsctl list-ports switch0
|
ovs-vsctl list-ports switch0
|
||||||
|
|
||||||
ovs-vsctl show
|
ovs-vsctl show
|
Loading…
Reference in New Issue
Block a user