Commit 9b9a6b63 authored by gauthier's avatar gauthier

parent cc0e4099
......@@ -93,6 +93,29 @@ test_command_install_script "ovs-vsctl" "$OPENAIRCN_DIR/SCRIPTS/install_openvsw
test_command_install_package "tunctl" "uml-utilities"
test_command_install_lib "/usr/lib/libconfig.so" "libconfig-dev"
test_command_install_script "asn1c" "$OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash"
# One mor check about version of asn1c
ASN1C_COMPILER_REQUIRED_VERSION_MESSAGE="ASN.1 Compiler, v0.9.24"
ASN1C_COMPILER_VERSION_MESSAGE=`asn1c -h 2>&1 | grep -i ASN\.1\ Compiler`
##ASN1C_COMPILER_VERSION_MESSAGE=`trim $ASN1C_COMPILER_VERSION_MESSAGE`
if [ "$ASN1C_COMPILER_VERSION_MESSAGE" != "$ASN1C_COMPILER_REQUIRED_VERSION_MESSAGE" ]
then
diff <(echo -n "$ASN1C_COMPILER_VERSION_MESSAGE") <(echo -n "$ASN1C_COMPILER_REQUIRED_VERSION_MESSAGE")
echo_error "Version of asn1c is not the required one, do you want to install the required one (overwrite installation) ? (Y/n)"
echo_error "$ASN1C_COMPILER_VERSION_MESSAGE"
while read -r -n 1 -s answer; do
if [[ $answer = [YyNn] ]]; then
[[ $answer = [Yy] ]] && $OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash
[[ $answer = [Nn] ]] && echo_error "Version of asn1c is not the required one, exiting." && exit 1
break
fi
done
fi
cd $THIS_SCRIPT_PATH
#######################################################
# FIND CONFIG FILE
......
......@@ -375,7 +375,7 @@ is_vlan_interface() {
for var in "$@"
do
if [ "a$var" == "a" ]; then
my_bool=0
return 0
fi
if [[ $var == *.* ]]
then
......@@ -386,11 +386,13 @@ is_vlan_interface() {
if [ "a${interface_name:0:3}" != "aeth" ]; then
if [ "a${interface_name:0:4}" != "awlan" ]; then
if [ "a${interface_name:0:4}" != "awifi" ]; then
my_bool=0;
return 0;
fi
fi
fi
fi
else
return 0;
fi
done
return $my_bool
......@@ -451,18 +453,22 @@ build_enb_vlan_network() {
clean_enb_vlan_network() {
is_vlan_interface $ENB_INTERFACE_NAME_FOR_S1_MME
if [ $? -eq 1 ]; then
echo_success "Found VLAN interface $ENB_INTERFACE_NAME_FOR_S1_MME ... deleting"
ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME down > /dev/null 2>&1
vconfig rem $ENB_INTERFACE_NAME_FOR_S1_MME > /dev/null 2>&1
fi;
is_vlan_interface $ENB_INTERFACE_NAME_FOR_S1U
if [ $? -eq 1 ]; then
echo_success "Found VLAN interface $ENB_INTERFACE_NAME_FOR_S1U ... deleting"
ifconfig $ENB_INTERFACE_NAME_FOR_S1U down > /dev/null 2>&1
vconfig rem $ENB_INTERFACE_NAME_FOR_S1U > /dev/null 2>&1
fi;
sync;
clean_network
}
test_enb_vlan_network() {
# TEST INTERFACES
#ping -q -c 1 $MME_IPV4_ADDRESS_FOR_S1_MME > /dev/null 2>&1
......@@ -712,6 +718,7 @@ clean_epc_vlan_network() {
vconfig rem $PGW_INTERFACE_NAME_FOR_SGI.$i > /dev/null 2>&1
done
#ip link set $PGW_INTERFACE_NAME_FOR_SGI down > /dev/null 2>&1
clean_network
}
build_openvswitch_network() {
......@@ -1041,9 +1048,28 @@ clean_epc_ovs_network() {
vconfig rem $PGW_INTERFACE_NAME_FOR_SGI.$i > /dev/null 2>&1
done
clean_network
clean_openvswitch_network
}
clean_network() {
interfaces=`ifconfig | grep HWaddr | cut -d " " -f1-2 | tr -d '\n'`
for interface in $interfaces
do
is_openvswitch_interface $interface
if [ $? -eq 1 ]; then
echo_success "Found open-vswitch interface $interface ... deleting"
delete_openvswitch_interface $interface
fi
is_vlan_interface $interface
if [ $? -eq 1 ]; then
echo_success "Found VLAN interface $interface ... deleting"
ifconfig $interface down > /dev/null 2>&1
vconfig rem $interface > /dev/null 2>&1
fi
done
}
###########################################################
IPTABLES=/sbin/iptables
......
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