diff --git a/openair-cn/SCRIPTS/install_openvswitch1.9.0.bash b/openair-cn/SCRIPTS/install_openvswitch1.9.0.bash index bc044f08837e019a948219498871967db6710451..93cf4a384087fa069e0703b3c46c71eaac81c2d7 100755 --- a/openair-cn/SCRIPTS/install_openvswitch1.9.0.bash +++ b/openair-cn/SCRIPTS/install_openvswitch1.9.0.bash @@ -13,7 +13,9 @@ linux-headers-`uname -r` vlan -y rmmod bridge cd /usr/local/src/ -wget http://openvswitch.org/releases/openvswitch-1.9.0.tar.gz +if [ ! -f /usr/local/src/openvswitch-1.9.0.tar.gz ]; then + wget http://openvswitch.org/releases/openvswitch-1.9.0.tar.gz +fi tar -xzf openvswitch-1.9.0.tar.gz cd openvswitch-1.9.0 ./boot.sh @@ -27,7 +29,7 @@ if [ -f /lib/modules/`uname -r`/kernel/net/openvswitch/openvswitch.ko ] ; then else if [ -f /lib/modules//`uname -r`/extra/openvswitch.ko ] ; then insmod /lib/modules//`uname -r`/extra/openvswitch.ko - else + else echo_error "Could not find openvswitch.ko, exiting" exit 1 fi @@ -56,7 +58,7 @@ ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:O ovs-vsctl --no-wait init -# Then start the main Open vSwitch daemon, telling it to +# Then start the main Open vSwitch daemon, telling it to # connect to the same Unix domain socket: ovs-vswitchd --pidfile --detach diff --git a/openair-cn/SCRIPTS/start_lte-epc-ovs.bash b/openair-cn/SCRIPTS/start_lte-epc-ovs.bash index 7ca84d8e9648136ae9ea9b52d5027c0cd42f960a..6d6e2c7150517a7ad95895c19c2a8bf0c67a6564 100755 --- a/openair-cn/SCRIPTS/start_lte-epc-ovs.bash +++ b/openair-cn/SCRIPTS/start_lte-epc-ovs.bash @@ -61,6 +61,10 @@ then done fi +# May we have booted on a new kernel, not the one when we build vswitch kernel module +if [ ! -f /lib/modules/`uname -r`/extra/openvswitch.ko ]; then + $OPENAIRCN_DIR/SCRIPTS/install_openvswitch1.9.0.bash +fi IPTABLES=`which iptables`