Toggle navigation
Toggle navigation
This project
Loading...
Sign in
UT
/
ipw
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Artyom A Anikeev
2014-04-04 17:32:27 +0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85125a6bf29e5be1c6fde1d2e2fe96e4b395b97a
85125a6b
1 parent
0f78210b
ability of bringign up was appended
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
ipw
ipw
View file @
85125a6
...
...
@@ -306,24 +306,19 @@ case "$CMD" in
done
if
[[
"
$IS_SLAVE
"
=
0
]]
;
then
BRIDGE_IN_USE
=
0
VLAN_IN_USE
=
0
VLAN_N_BRIDGE_IN_USE
=
0
for
VLAN_N_BRIDGE
in
"
${
!VLAN_N_BRIDGE_VARIABLE
}
"
;
do
parse_vlan_subvlan_bridge
"
${
VLAN_N_BRIDGE
}
"
if
[[
"
$LINE
"
=
"
$VLAN_N_BRIDGE
"
]]
;
then
BRIDGE_IN_USE
=
1
VLAN_IN_USE
=
1
VLAN_N_BRIDGE_IN_USE
=
1
elif
[[
"
$BRNAME
"
=
"
$OLD_BRNAME
"
]]
;
then
BRIDGE_IN_USE
=
1
elif
[[
"
$VLANNAME
"
=
"
$OLD_VLANNAME
"
]]
;
then
VLAN_IN_USE
=
1
fi
done
...
...
@@ -370,12 +365,15 @@ case "$CMD" in
echo
FULL_PARVLAN_NAME
$FULL_PARVLAN_NAME
echo
D1Q_IFACE
$D1Q_IFACE
##
if
[[
"
`
ip link show | grep
"
$
VLAN
"
`
"
=
""
]]
;
then
#should we create a new parent vlan?
if
[[
"
`
ip link show | grep
"
$
FULL_PARVLAN_NAME
"
`
"
=
""
]]
;
then
#should we create a new parent vlan?
echo
"ip link add link
$D1Q_IFACE
name
$FULL_PARVLAN_NAME
type vlan id
$VLAN
"
#vlan in bond
echo
"ip link set dev
$FULL_PARVLAN_NAME
up"
fi
echo
"ip link add link
$FULL_PARVLAN_NAME
name
$FULL_VLAN_NAME
type vlan id
$SUBVLAN
"
#subvlan in vlan
echo
"ip link set dev
$FULL_VLAN_NAME
up"
else
echo
"ip link add link
$D1Q_IFACE
name
$FULL_VLAN_NAME
type vlan id
$VLANNAME
"
#vlan in bond
echo
"ip link set dev
$FULL_VLAN_NAME
up"
fi
fi
fi
...
...
@@ -396,11 +394,13 @@ case "$CMD" in
if
[[
"
$OLD_BRNAME
"
=
""
]]
;
then
#is this vlan nave been already enslaved?
#brctl addif "$BRNAME" "$FULL_VLANNAME"
echo
"ip link set "
$FULL_VLAN_NAME
" master "
$BRNAME
echo
"ip link set dev
$BRNAME
up"
else
#brctl delif "$OLD_BRNAME" "FULL_VLANNAME"
echo
"ip link set "
$FULL_VLAN_NAME
" nomaster"
#brctl addif "$BRNAME" "$FULL_VLANNAME"
echo
"ip link set "
$FULL_VLAN_NAME
" master "
$BRNAME
echo
"ip link set dev
$BRNAME
up"
fi
fi
fi
...
...
Please
register
or
login
to post a comment