Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
intel
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
Releases
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
intel
Commits
59a3ad01
Commit
59a3ad01
authored
5 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
netifd: wireless: iopsys_utils: alternate approach to getting interface status
parent
09715c96
Branches
network_bridge_cfg
No related tags found
No related merge requests found
Pipeline
#22
failed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lq-wave-300_5_x/files/lib/netifd/wireless/iopsys_utils.sh
+16
-7
16 additions, 7 deletions
lq-wave-300_5_x/files/lib/netifd/wireless/iopsys_utils.sh
with
16 additions
and
7 deletions
lq-wave-300_5_x/files/lib/netifd/wireless/iopsys_utils.sh
+
16
−
7
View file @
59a3ad01
...
@@ -115,6 +115,7 @@ remove_disabled_vifs() {
...
@@ -115,6 +115,7 @@ remove_disabled_vifs() {
local
cfg
=
$1
local
cfg
=
$1
local
vif
=
$2
local
vif
=
$2
#config_load network
config_get is_lan
$cfg
is_lan
"0"
config_get is_lan
$cfg
is_lan
"0"
config_get
type
$cfg
type
config_get
type
$cfg
type
...
@@ -126,6 +127,14 @@ remove_disabled_vifs() {
...
@@ -126,6 +127,14 @@ remove_disabled_vifs() {
[
-n
"
${
ifc
/wlan*/
}
"
]
&&
continue
[
-n
"
${
ifc
/wlan*/
}
"
]
&&
continue
vif_cfg
=
$(
uci show wireless |
grep
@wifi-iface |
grep
"ifname=
\'
$ifc
\'
"
|
awk
-F
'.'
'{print $2}'
)
vif_cfg
=
$(
uci show wireless |
grep
@wifi-iface |
grep
"ifname=
\'
$ifc
\'
"
|
awk
-F
'.'
'{print $2}'
)
#test=$(ubus call uci get '{"config":"wireless", "type":"wifi-iface", "match":{"ifname":"'$ifc'"}}' | grep "\.name" | awk -F ' ' '{print $2}')
#vif_cfg="${test//[\",]}"
#
#config_load wireless
#config_get device $vif_cfg device
#config_get radio_disabled $device disabled
#config_get disabled $vif_cfg disabled
#config_get net $vif_cfg network
device
=
$(
uci
-q
get wireless.
$vif_cfg
.device
)
device
=
$(
uci
-q
get wireless.
$vif_cfg
.device
)
radio_disabled
=
$(
uci
-q
get wireless.
$device
.disabled
)
radio_disabled
=
$(
uci
-q
get wireless.
$device
.disabled
)
...
@@ -142,6 +151,13 @@ network_remove_disabled_vifs() {
...
@@ -142,6 +151,13 @@ network_remove_disabled_vifs() {
config_foreach remove_disabled_vifs interface
config_foreach remove_disabled_vifs interface
}
}
network_add_vifs
()
{
nets
=
$(
uci show network |
grep
network.
*
.interface |
awk
-F
'[.,=]'
'{print$2}'
)
config_load wireless
config_foreach add_to_network wifi-iface
"
$nets
"
}
add_to_network
()
{
add_to_network
()
{
local
cfg
=
$1
local
cfg
=
$1
local
nets
=
$2
local
nets
=
$2
...
@@ -175,11 +191,4 @@ add_to_network() {
...
@@ -175,11 +191,4 @@ add_to_network() {
uci
-q
set
network.
$net
.ifname
=
"
$(
echo
$ifname
|
tr
' '
'\n'
|
sort
-u
|
tr
'\n'
' '
|
sed
's/[ \t]*$//'
)
"
uci
-q
set
network.
$net
.ifname
=
"
$(
echo
$ifname
|
tr
' '
'\n'
|
sort
-u
|
tr
'\n'
' '
|
sed
's/[ \t]*$//'
)
"
done
done
uci commit network
uci commit network
}
network_add_vifs
()
{
nets
=
$(
uci show network |
grep
network.
*
.interface |
awk
-F
'[.,=]'
'{print$2}'
)
config_load wireless
config_foreach add_to_network wifi-iface
"
$nets
"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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