diff --git a/wan-failover b/wan-failover index fde9d1f..7d4b842 100755 --- a/wan-failover +++ b/wan-failover @@ -50,9 +50,9 @@ cfg_init() { check_interval=$(ourcfg globals.check_interval || echo $default_check_interval) 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_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_ping_count=$(ourcfg $primary_iface.count || echo $default_ping_count) diff --git a/wan-failover.config b/wan-failover.config index 3f4f172..e6c53a8 100644 --- a/wan-failover.config +++ b/wan-failover.config @@ -14,6 +14,7 @@ config interface 'wan' option timeout '2' option down '3' option up '5' +# option ifname 'eth2' config interface 'wwan' list ip '8.8.8.8' @@ -25,3 +26,4 @@ config interface 'wwan' option timeout '2' option down '3' option up '5' +# option ifname 'wwan0'