wait link up before route configuration

"[email protected]" <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
Hi After configuring interfaces and routes, and triggering a 'service 
netif restart && service routing restart' is there a way to wait for the 
'carrier up' of the interface before route reconfiguration? My use case 
is a server with 2 Mellanox and a Lagg. The 2 mce interfaces are UP in 
milliseconds but the lagg interface takes a few seconds to be UP, and 
the routing service says 'Network unreachable'. The subnet is a /32 and 
the gateway need a static route like: # /etc/rc.conf.d/netif 
cloned_interfaces="lagg0" ifconfig_mce0="up" ifconfig_mce1="up" 
ifconfig_lagg0="laggproto lacp laggport mce0 laggport mce1 198.51.100.1 
netmask 255.255.255.255 mtu 1500" # /etc/rc.conf.d/routing 
route_defaultgw="-host 203.0.113.1 -link -interface lagg0" 
defaultrouter="203.0.113.1" static_routes="defaultgw" If I run 'service 
netif restart && sleep 5 && service routing restart', everything is ok. 
I didn't find any options for that, and was thinking about a patch in 
the routing script. Thanks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.