Changeset 18313bb


Ignore:
Timestamp:
10/10/14 13:15:02 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, enter/10, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
fff4e56
Parents:
2cde2b3
Message:

Fix a bug getting the default network interface on 10.1 and later

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/scripts/backend/functions.sh

    r4128eae r18313bb  
    562562get_default_interface() 
    563563{ 
    564    netstat -f inet -nrW | grep '^default' | awk '{ print $7 }' 
     564   local iface 
     565   iface=`netstat -f inet -nrW | grep '^default' | awk '{ print $7 }'` 
     566   if [ -z "$iface" ] ; then 
     567     # For 10.1 and later 
     568     iface=`netstat -f inet -nrW | grep '^default' | awk '{ print $6 }'` 
     569   fi 
     570   echo $iface 
    565571} 
    566572 
Note: See TracChangeset for help on using the changeset viewer.