From 062fd53533768abd31f88a2c60429928b1d5d34f Mon Sep 17 00:00:00 2001 From: Lionel Gauthier Date: Tue, 14 Apr 2015 12:26:41 +0000 Subject: [PATCH] ok git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7162 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- cmake_targets/tools/run_enb_ue_virt_s1 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cmake_targets/tools/run_enb_ue_virt_s1 b/cmake_targets/tools/run_enb_ue_virt_s1 index b23b99a87..c3a2cc84d 100755 --- a/cmake_targets/tools/run_enb_ue_virt_s1 +++ b/cmake_targets/tools/run_enb_ue_virt_s1 @@ -82,6 +82,7 @@ function help() echo_error "Options:" echo_error "Mandatory arguments to long options are mandatory for short options too." echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)" + echo_error " Default eNB config file if not set is $1" echo_error " -g, --gdb Run with GDB." echo_error " -h, --help Print this help." echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)" @@ -93,10 +94,13 @@ function help() function main() { + set_openair_env + cecho "OPENAIR_DIR = $OPENAIR_DIR" $green local -i run_gdb=0 local exe_arguments="" - local CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf + local DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf + local CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB until [ -z "$1" ] do @@ -116,7 +120,6 @@ function main() echo_fatal "config file $CONFIG_FILE_ENB not found" fi fi - exe_arguments="$exe_arguments --enb-conf $CONFIG_FILE_ENB" shift 2; ;; -g | --gdb) @@ -125,7 +128,7 @@ function main() shift; ;; -h | --help) - help + help $DEFAULT_CONFIG_FILE_ENB shift; exit 0 ;; @@ -155,8 +158,9 @@ function main() esac done - set_openair_env - cecho "OPENAIR_DIR = $OPENAIR_DIR" $green + # may use default config file + exe_arguments="$exe_arguments --enb-conf $CONFIG_FILE_ENB" + ####################################################### @@ -224,7 +228,7 @@ function main() echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1 echo "run" >> ~/.gdb_enb_ue_s1 cat ~/.gdb_enb_ue_s1 - gdb -n -x ~/.gdb_enb_ue_s1 2>&1 + gdb -n -x ~/.gdb_enb_ue_s1 fi } -- 2.18.1