Changeset 7102 in vbox for trunk/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh
- Timestamp:
- Feb 25, 2008 9:49:05 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh
r5998 r7102 22 22 fi 23 23 24 # Try obtain a physical NIC that is currently active25 phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==7 && $3=="up" { print $1 }'`26 if [ -z "$phys_nic" ]; then27 # Failed to get a currently active NIC, get the first available NIC.28 phys_nic=`/usr/sbin/dladm show-link | /usr/bin/nawk '/legacy/ {next} {print $1; exit}'`29 if [ -z "$phys_nic" ]; then30 # Failed to get any NICs!31 echo "Failed to get a physical NIC to bind to."32 exit 133 fi34 fi35 vnic_id=036 vnic_name=""37 24 mac=$1 38 39 25 # Create the VNIC if required 40 26 if [ -z "$2" ]; then 27 # Try obtain a physical NIC that is currently active 28 phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==7 && $3=="up" { print $1 }'` 29 if [ -z "$phys_nic" ]; then 30 # Failed to get a currently active NIC, get the first available NIC. 31 phys_nic=`/usr/sbin/dladm show-link | /usr/bin/nawk '/legacy/ {next} {print $1; exit}'` 32 if [ -z "$phys_nic" ]; then 33 # Failed to get any NICs! 34 echo "Failed to get a physical NIC to bind to." 35 exit 1 36 fi 37 fi 38 41 39 # To use a specific physical NIC, replace $phys_nic with the name of the NIC. 42 40 vnic_id=`/usr/lib/vna $phys_nic $mac` … … 76 74 77 75 echo "$vnic_name" 78 exit $?76 exit 0 79 77
Note:
See TracChangeset
for help on using the changeset viewer.