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
常顺宇
OpenXG-RAN
Commits
be804236
Commit
be804236
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@5137
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
d4e6575a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
60 deletions
+65
-60
targets/PROJECTS/GENERIC-LTE-EPC/utils.bash
targets/PROJECTS/GENERIC-LTE-EPC/utils.bash
+65
-60
No files found.
targets/PROJECTS/GENERIC-LTE-EPC/utils.bash
View file @
be804236
...
...
@@ -325,72 +325,75 @@ check_for_root_rights() {
}
is_openvswitch_interface
()
{
if
[
"a
$1
"
==
"a"
]
;
then
return
0
fi
if
[
"a
${
1
:0:3
}
"
==
"aeth"
]
;
then
return
0
;
else
if
[
"a
${
1
:0:4
}
"
==
"awlan"
]
;
then
return
0
;
else
if
[
"a
${
1
:0:4
}
"
==
"awifi"
]
;
then
return
0
;
else
if
[
"a
${
1
:0:4
}
"
==
"anone"
]
;
then
return
0
;
fi
fi
fi
fi
return
1
;
for
var
in
"
$@
"
do
if
[
"a
$var
"
==
"a"
]
;
then
return
0
fi
if
[
"a
${
var
:0:3
}
"
==
"aeth"
]
;
then
return
0
;
else
if
[
"a
${
var
:0:4
}
"
==
"awlan"
]
;
then
return
0
;
else
if
[
"a
${
var
:0:4
}
"
==
"awifi"
]
;
then
return
0
;
else
if
[
"a
${
var
:0:4
}
"
==
"anone"
]
;
then
return
0
;
fi
fi
fi
fi
done
return
1
;
}
is_real_interface
()
{
if
[
"a
$1
"
==
"a"
]
;
then
return
0
fi
IF
=
`
cat
/etc/udev/rules.d/70-persistent-net.rules |
grep
$1
|
sed
's/^.*NAME=//'
|
tr
-d
'"'
`
if
[
"
$IF
"
==
"
$1
"
]
;
then
if
[
"a
${
1
:0:3
}
"
==
"aeth"
]
;
then
return
1
;
else
if
[
"a
${
1
:0:4
}
"
==
"awlan
"
]
;
then
return
1
;
else
if
[
"a
${
1
:0:4
}
"
==
"awifi"
]
;
then
return
1
;
fi
fi
fi
fi
return
0
my_bool
=
1
for
var
in
"
$@
"
do
if
[
"a
$var
"
==
"a"
]
;
then
return
0
fi
IF
=
`
cat
/etc/udev/rules.d/70-persistent-net.rules |
grep
$var
|
sed
's/^.*NAME=//'
|
tr
-d
'"'
`
if
[
"
$IF
"
==
"
$var
"
]
;
then
if
[
"a
${
var
:0:3
}
"
!=
"aeth
"
]
;
then
if
[
"a
${
var
:0:4
}
"
!=
"awlan"
]
;
then
if
[
"a
${
var
:0:4
}
"
!=
"awifi"
]
;
then
my_bool
=
0
;
fi
fi
fi
fi
done
return
$my_bool
}
is_vlan_interface
()
{
if
[
"a
$1
"
==
"a"
]
;
then
return
0
fi
if
[[
$1
==
*
.
*
]]
then
interface_name
=
`
echo
$1
|
cut
-f1
-d
'.'
`
vlan
=
`
echo
$1
|
cut
-f2
-d
'.'
`
IF
=
`
cat
/etc/udev/rules.d/70-persistent-net.rules |
grep
$interface_name
|
sed
's/^.*NAME=//'
|
tr
-d
'"'
`
if
[
"
$IF
"
==
"
$interface_name
"
]
;
then
if
[
"a
${
interface_name
:0:3
}
"
==
"aeth"
]
;
then
return
1
;
else
if
[
"a
${
interface_name
:0:4
}
"
==
"awlan
"
]
;
then
return
1
;
else
if
[
"a
${
interface_name
:0:4
}
"
==
"awifi"
]
;
then
return
1
;
fi
fi
fi
fi
fi
return
0
my_bool
=
1
for
var
in
"
$@
"
do
if
[
"a
$var
"
==
"a"
]
;
then
my_bool
=
0
fi
if
[[
$var
==
*
.
*
]]
then
interface_name
=
`
echo
$var
|
cut
-f1
-d
'.'
`
vlan
=
`
echo
$var
|
cut
-f2
-d
'.'
`
IF
=
`
cat
/etc/udev/rules.d/70-persistent-net.rules |
grep
$interface_name
|
sed
's/^.*NAME=//'
|
tr
-d
'"'
`
if
[
"
$IF
"
==
"
$interface_name
"
]
;
then
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
;
fi
fi
fi
fi
fi
done
return
$my_bool
}
...
...
@@ -955,6 +958,8 @@ build_epc_ovs_network() {
sync
bash_exec
"vconfig add
$PGW_INTERFACE_NAME_FOR_SGI
$i
"
sync
bash_exec
"ifconfig
$PGW_INTERFACE_NAME_FOR_SGI
.
$i
up"
sync
# configure vlan interface
#CIDR=$NETWORK'.'$i'/24'
base
=
200
...
...
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