Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
targets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feed
targets
Commits
41dbf195
Commit
41dbf195
authored
3 years ago
by
Sukru Senli
Browse files
Options
Downloads
Patches
Plain Diff
iopsys-econet: remove econet specific switch config
parent
aa7b04f2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iopsys-econet/base-files/lib/network/switch.sh
+0
-58
0 additions, 58 deletions
iopsys-econet/base-files/lib/network/switch.sh
with
0 additions
and
58 deletions
iopsys-econet/base-files/lib/network/switch.sh
deleted
100644 → 0
+
0
−
58
View file @
aa7b04f2
#!/bin/sh
.
/lib/functions.sh
WANDEV
=
LANDEVS
=
tc3162_eth_portmap
()
{
wan_port
=
"-1"
lan1_port
=
"-1"
lan2_port
=
"-1"
lan3_port
=
"-1"
lan4_port
=
"-1"
lan5_port
=
"-1"
lan6_port
=
"-1"
case
"
$WANDEV
"
in
eth0.[0-9]
)
wan_port
=
${
WANDEV
:5
}
;;
esac
lan_ports
=
"
$(
echo
$LANDEVS
|
tr
-d
'eth0.'
)
"
port_num
=
$(
echo
$lan_ports
|
wc
-w
)
[
$port_num
-gt
0
]
&&
lan1_port
=
"
$(
echo
$lan_ports
|
cut
-d
' '
-f1
)
"
[
$port_num
-gt
1
]
&&
lan2_port
=
"
$(
echo
$lan_ports
|
cut
-d
' '
-f2
)
"
[
$port_num
-gt
2
]
&&
lan3_port
=
"
$(
echo
$lan_ports
|
cut
-d
' '
-f3
)
"
[
$port_num
-gt
3
]
&&
lan4_port
=
"
$(
echo
$lan_ports
|
cut
-d
' '
-f4
)
"
[
$port_num
-gt
4
]
&&
lan5_port
=
"
$(
echo
$lan_ports
|
cut
-d
' '
-f5
)
"
[
$port_num
-gt
5
]
&&
lan6_port
=
"
$(
echo
$lan_ports
|
cut
-d
' '
-f6
)
"
echo
$wan_port
$lan1_port
$lan2_port
$lan3_port
$lan4_port
$lan5_port
$lan6_port
>
/proc/tc3162/eth_portmap
}
assign_to_lan_wan
(){
local
cfg
=
$1
local
ifname uplink
config_get ifname
$cfg
ifname
[
-d
/sys/class/net/
$ifname
]
||
return
0
config_get_bool uplink
$cfg
uplink 0
if
[
$uplink
-eq
1
]
;
then
WANDEV
=
"
$ifname
"
else
LANDEVS
=
"
$LANDEVS
$ifname
"
fi
}
setup_switch
()
{
[
-d
/proc/tc3162
]
||
return
0
[
-f
/etc/config/ports
]
||
return
0
config_load ports
config_foreach assign_to_lan_wan ethport
[
-n
"
$WANDEV
"
-o
-n
"
$LANDEVS
"
]
&&
tc3162_eth_portmap
}
This diff is collapsed.
Click to expand it.
Sukru Senli
@sukrus
mentioned in commit
5d6810ed
·
3 years ago
mentioned in commit
5d6810ed
mentioned in commit 5d6810ed24b4009e7baf69cd831154fea6f69afa
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment