Commit 5f330873 authored by thomasl's avatar thomasl

i fix error printing when module is not already loaded


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6031 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent cf6aeec4
...@@ -12,8 +12,19 @@ SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'` ...@@ -12,8 +12,19 @@ SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
sudo setpci -s $SLOT_NUMBER 60.b=10 sudo setpci -s $SLOT_NUMBER 60.b=10
done done
sudo rmmod openair_rf load_module() {
sudo insmod $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom/openair_rf.ko mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
load_module $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom/openair_rf.ko
sleep 1 sleep 1
if [ ! -e /dev/openair0 ]; then if [ ! -e /dev/openair0 ]; then
...@@ -43,8 +54,7 @@ else ...@@ -43,8 +54,7 @@ else
fi fi
fi fi
sudo rmmod nasmesh load_module $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
#if [ "$1" = "eNB" ]; then #if [ "$1" = "eNB" ]; then
# echo "bring up oai0 interface for enb" # echo "bring up oai0 interface for enb"
......
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