mirror of
https://github.com/buildwithparallel/openwrt
synced 2026-08-10 21:35:45 -04:00
netifd: (APP-2648, PR #206) only reconfigure switch if changes
This avoids our ethernet link dropping on any network change. It's a quick and dirty patch so we have minimal code here. Approved-by: Arien Judge Approved-by: Evan Benn
This commit is contained in:
parent
b5fa3591c7
commit
3b0959bb87
1 changed files with 4 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ init_switch() {
|
|||
|
||||
include /lib/network
|
||||
setup_switch
|
||||
uci show network | grep '^network.@switch' > /var/swconfig.current
|
||||
}
|
||||
|
||||
start_service() {
|
||||
|
|
@ -28,7 +29,9 @@ start_service() {
|
|||
reload_service() {
|
||||
local rv=0
|
||||
|
||||
init_switch
|
||||
if ! uci show network | grep '^network.@switch' | cmp -s /var/swconfig.current; then
|
||||
init_switch
|
||||
fi
|
||||
ubus call network reload || rv=1
|
||||
/sbin/wifi reload_legacy
|
||||
return $rv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue