Commit e40a6bd3 authored by Lionel Gauthier's avatar Lionel Gauthier

Work on ubuntu 12.04 64 bits, machine yang

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4907 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4877c718
#!/bin/bash #!/bin/bash
# Tested on ubuntu 12.04 with updates on 05 april 2013, 07 november 2013 # Tested on ubuntu 12.04 with updates on 05 april 2013, 07 november 2013, 20 january 2014
# Make sure only root can run our script # Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
...@@ -22,8 +22,16 @@ make ...@@ -22,8 +22,16 @@ make
make install make install
make modules_install make modules_install
insmod /lib/modules/`uname -r`/kernel/net/openvswitch/openvswitch.ko if [ -f /lib/modules/`uname -r`/kernel/net/openvswitch/openvswitch.ko ] ; then
insmod /lib/modules/`uname -r`/kernel/net/openvswitch/openvswitch.ko
else
if [ -f /lib/modules//`uname -r`/extra/openvswitch.ko ] ; then
insmod /lib/modules//`uname -r`/extra/openvswitch.ko
else
echo_error "Could not find openvswitch.ko, exiting"
exit 1
fi
fi
# Initialize the configuration database using ovsdb-tool, e.g.: # Initialize the configuration database using ovsdb-tool, e.g.:
mkdir -p /usr/local/etc/openvswitch mkdir -p /usr/local/etc/openvswitch
......
...@@ -80,14 +80,14 @@ then ...@@ -80,14 +80,14 @@ then
cd ./$OBJ_DIR cd ./$OBJ_DIR
fi fi
else else
OBJ_DIR="OBJS" OBJ_DIR="objs"
bash_exec "mkdir -m 777 ./$OBJ_DIR" bash_exec "mkdir -m 777 ./$OBJ_DIR"
echo_success "Created $OBJ_DIR directory" echo_success "Created $OBJ_DIR directory"
echo_success "Invoking autogen" echo_success "Invoking autogen"
bash_exec "./autogen.sh" bash_exec "./autogen.sh"
cd ./$OBJ_DIR cd ./$OBJ_DIR
echo_success "Invoking configure" echo_success "Invoking configure"
../configure --enable-standalone-epc --disable-nas LDFLAGS=-L/usr/local/lib ../configure --enable-standalone-epc LDFLAGS=-L/usr/local/lib
fi fi
if [ -f Makefile ] if [ -f Makefile ]
then then
...@@ -132,7 +132,7 @@ else ...@@ -132,7 +132,7 @@ else
fi fi
####################################################### #######################################################
# SOURCE $OPENAIRCN_DIR/UTILS/CONF/epc_$HOSTNAME.conf # SOURCE $OPENAIRCN_DIR/UTILS/CONF/enb_$HOSTNAME.conf
####################################################### #######################################################
rm -f /tmp/source.txt rm -f /tmp/source.txt
if [ -f $OPENAIRCN_DIR/UTILS/CONF/enb_$HOSTNAME.conf ] if [ -f $OPENAIRCN_DIR/UTILS/CONF/enb_$HOSTNAME.conf ]
...@@ -185,8 +185,8 @@ echo " Disabling reverse path filtering" ...@@ -185,8 +185,8 @@ echo " Disabling reverse path filtering"
bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0" bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
echo_warning "LG FORCED EXIT" #echo_warning "LG FORCED EXIT"
exit #exit
start_openswitch_daemon start_openswitch_daemon
# REMINDER: # REMINDER:
...@@ -374,6 +374,6 @@ bash_exec "ip link set $PGW_INTERFACE_NAME_FOR_SGI promisc on" ...@@ -374,6 +374,6 @@ bash_exec "ip link set $PGW_INTERFACE_NAME_FOR_SGI promisc on"
# LAUNCH MME + S+P-GW executable # LAUNCH MME + S+P-GW executable
################################################## ##################################################
cd $OPENAIRCN_DIR/$OBJ_DIR
gdb --args $OPENAIR3_DIR/OPENAIRMME/objs/OAI_EPC/oai_epc -c $OPENAIR3_DIR/OPENAIRMME/UTILS/CONF/mme_default.conf gdb --args $OPENAIRCN_DIR/$OBJ_DIR/OAI_EPC/oai_epc -c $OPENAIRCN_DIR/UTILS/CONF/mme_default.conf
wait_process_started "oai_epc" wait_process_started "oai_epc"
...@@ -228,7 +228,7 @@ test_command_install_script() { ...@@ -228,7 +228,7 @@ test_command_install_script() {
start_openswitch_daemon() { start_openswitch_daemon() {
rmmod -s bridge rmmod -s bridge
if [[ -e "/lib/modules/`uname -r`/extra/openvswitch.ko" ]] ; then if [[ -e "/lib/modules/`uname -r`/extra/openvswitch.ko" ]] ; then
bash_exec "insmod /lib/modules/`uname -r`/extra/openvswitch.ko" bash_exec "insmod /lib/modules/`uname -r`/extra/openvswitch.ko" > /dev/null 2>&1
else else
echo_error "/lib/modules/`uname -r`/extra/openvswitch.ko not found, exiting" echo_error "/lib/modules/`uname -r`/extra/openvswitch.ko not found, exiting"
exit -1 exit -1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment