Try harder to determine interface device names
And also allow the wan-failover config to override it in case it's not in the network config, which it seems like it isn't anymore.
This commit is contained in:
parent
73cd11d943
commit
0517eab29a
@ -50,9 +50,9 @@ cfg_init() {
|
|||||||
check_interval=$(ourcfg globals.check_interval || echo $default_check_interval)
|
check_interval=$(ourcfg globals.check_interval || echo $default_check_interval)
|
||||||
|
|
||||||
primary_iface=$(ourcfg globals.primary || echo '')
|
primary_iface=$(ourcfg globals.primary || echo '')
|
||||||
primary_ifname=$(cfg network.$primary_iface.ifname || echo '')
|
primary_ifname=$(ourcfg wan.ifname || cfg network.$primary_iface.ifname || cfg network.$primary_iface.device || echo '')
|
||||||
fallback_iface=$(ourcfg globals.fallback || echo '')
|
fallback_iface=$(ourcfg globals.fallback || echo '')
|
||||||
fallback_ifname=$(cfg network.$fallback_iface.ifname || echo '')
|
fallback_ifname=$(ourcfg wwan.ifname || cfg network.$fallback_iface.ifname || cfg network.$fallback_iface.device || echo '')
|
||||||
|
|
||||||
primary_health_ips=$(ourcfg $primary_iface.ip || echo $default_health_ips)
|
primary_health_ips=$(ourcfg $primary_iface.ip || echo $default_health_ips)
|
||||||
primary_ping_count=$(ourcfg $primary_iface.count || echo $default_ping_count)
|
primary_ping_count=$(ourcfg $primary_iface.count || echo $default_ping_count)
|
||||||
|
@ -14,6 +14,7 @@ config interface 'wan'
|
|||||||
option timeout '2'
|
option timeout '2'
|
||||||
option down '3'
|
option down '3'
|
||||||
option up '5'
|
option up '5'
|
||||||
|
# option ifname 'eth2'
|
||||||
|
|
||||||
config interface 'wwan'
|
config interface 'wwan'
|
||||||
list ip '8.8.8.8'
|
list ip '8.8.8.8'
|
||||||
@ -25,3 +26,4 @@ config interface 'wwan'
|
|||||||
option timeout '2'
|
option timeout '2'
|
||||||
option down '3'
|
option down '3'
|
||||||
option up '5'
|
option up '5'
|
||||||
|
# option ifname 'wwan0'
|
||||||
|
Loading…
Reference in New Issue
Block a user