Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
9b9a6b63
Commit
9b9a6b63
authored
Mar 11, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5142
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
cc0e4099
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash
targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash
+23
-0
targets/PROJECTS/GENERIC-LTE-EPC/utils.bash
targets/PROJECTS/GENERIC-LTE-EPC/utils.bash
+28
-2
No files found.
targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash
View file @
9b9a6b63
...
@@ -93,6 +93,29 @@ test_command_install_script "ovs-vsctl" "$OPENAIRCN_DIR/SCRIPTS/install_openvsw
...
@@ -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_package
"tunctl"
"uml-utilities"
test_command_install_lib
"/usr/lib/libconfig.so"
"libconfig-dev"
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
cd
$THIS_SCRIPT_PATH
#######################################################
#######################################################
# FIND CONFIG FILE
# FIND CONFIG FILE
...
...
targets/PROJECTS/GENERIC-LTE-EPC/utils.bash
View file @
9b9a6b63
...
@@ -375,7 +375,7 @@ is_vlan_interface() {
...
@@ -375,7 +375,7 @@ is_vlan_interface() {
for
var
in
"
$@
"
for
var
in
"
$@
"
do
do
if
[
"a
$var
"
==
"a"
]
;
then
if
[
"a
$var
"
==
"a"
]
;
then
my_bool
=
0
return
0
fi
fi
if
[[
$var
==
*
.
*
]]
if
[[
$var
==
*
.
*
]]
then
then
...
@@ -386,11 +386,13 @@ is_vlan_interface() {
...
@@ -386,11 +386,13 @@ is_vlan_interface() {
if
[
"a
${
interface_name
:0:3
}
"
!=
"aeth"
]
;
then
if
[
"a
${
interface_name
:0:3
}
"
!=
"aeth"
]
;
then
if
[
"a
${
interface_name
:0:4
}
"
!=
"awlan"
]
;
then
if
[
"a
${
interface_name
:0:4
}
"
!=
"awlan"
]
;
then
if
[
"a
${
interface_name
:0:4
}
"
!=
"awifi"
]
;
then
if
[
"a
${
interface_name
:0:4
}
"
!=
"awifi"
]
;
then
my_bool
=
0
;
return
0
;
fi
fi
fi
fi
fi
fi
fi
fi
else
return
0
;
fi
fi
done
done
return
$my_bool
return
$my_bool
...
@@ -451,18 +453,22 @@ build_enb_vlan_network() {
...
@@ -451,18 +453,22 @@ build_enb_vlan_network() {
clean_enb_vlan_network
()
{
clean_enb_vlan_network
()
{
is_vlan_interface
$ENB_INTERFACE_NAME_FOR_S1_MME
is_vlan_interface
$ENB_INTERFACE_NAME_FOR_S1_MME
if
[
$?
-eq
1
]
;
then
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
ifconfig
$ENB_INTERFACE_NAME_FOR_S1_MME
down
>
/dev/null 2>&1
vconfig rem
$ENB_INTERFACE_NAME_FOR_S1_MME
>
/dev/null 2>&1
vconfig rem
$ENB_INTERFACE_NAME_FOR_S1_MME
>
/dev/null 2>&1
fi
;
fi
;
is_vlan_interface
$ENB_INTERFACE_NAME_FOR_S1U
is_vlan_interface
$ENB_INTERFACE_NAME_FOR_S1U
if
[
$?
-eq
1
]
;
then
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
ifconfig
$ENB_INTERFACE_NAME_FOR_S1U
down
>
/dev/null 2>&1
vconfig rem
$ENB_INTERFACE_NAME_FOR_S1U
>
/dev/null 2>&1
vconfig rem
$ENB_INTERFACE_NAME_FOR_S1U
>
/dev/null 2>&1
fi
;
fi
;
sync
;
sync
;
clean_network
}
}
test_enb_vlan_network
()
{
test_enb_vlan_network
()
{
# TEST INTERFACES
# TEST INTERFACES
#ping -q -c 1 $MME_IPV4_ADDRESS_FOR_S1_MME > /dev/null 2>&1
#ping -q -c 1 $MME_IPV4_ADDRESS_FOR_S1_MME > /dev/null 2>&1
...
@@ -712,6 +718,7 @@ clean_epc_vlan_network() {
...
@@ -712,6 +718,7 @@ clean_epc_vlan_network() {
vconfig rem
$PGW_INTERFACE_NAME_FOR_SGI
.
$i
>
/dev/null 2>&1
vconfig rem
$PGW_INTERFACE_NAME_FOR_SGI
.
$i
>
/dev/null 2>&1
done
done
#ip link set $PGW_INTERFACE_NAME_FOR_SGI down > /dev/null 2>&1
#ip link set $PGW_INTERFACE_NAME_FOR_SGI down > /dev/null 2>&1
clean_network
}
}
build_openvswitch_network
()
{
build_openvswitch_network
()
{
...
@@ -1041,9 +1048,28 @@ clean_epc_ovs_network() {
...
@@ -1041,9 +1048,28 @@ clean_epc_ovs_network() {
vconfig rem
$PGW_INTERFACE_NAME_FOR_SGI
.
$i
>
/dev/null 2>&1
vconfig rem
$PGW_INTERFACE_NAME_FOR_SGI
.
$i
>
/dev/null 2>&1
done
done
clean_network
clean_openvswitch_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
IPTABLES
=
/sbin/iptables
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment