+ # Get default iface, IP and MTU
+ if [ -n "${OSM_DEFAULT_IF}" ]; then
+ OSM_DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
+ [ -z "${OSM_DEFAULT_IF}" ] && OSM_DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}')
+ [ -z "${OSM_DEFAULT_IF}" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0"
+ fi
+ DEFAULT_MTU=$(ip addr show ${OSM_DEFAULT_IF} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}')
+ OSM_DEFAULT_IP=`ip -o -4 a s ${OSM_DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]; exit}'`
+ [ -z "$OSM_DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route"
+