Changeset 9576 in vbox for trunk/src/VBox/Devices/Network/solaris
- Timestamp:
- Jun 10, 2008 4:04:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh
r8892 r9576 1 1 #!/bin/bash 2 set -x 2 3 # Sun xVM VirtualBox 3 4 # VirtualBox VNIC setup script for Solaris hosts with Crossbow. … … 34 35 # Try obtain a physical NIC that is currently active 35 36 phys_nic=`/usr/sbin/dladm show-dev | /usr/bin/awk 'NF==4 && $2=="up" { print $1 }'` 36 # Failed to get a currently active NIC, get the first available NIC.37 phys_nic=`/usr/sbin/dladm show-link | /usr/bin/nawk '/legacy/ {next} {print $1; exit}'`38 37 if [ -z "$phys_nic" ]; then 39 # Failed to get any NICs! 40 echo "Failed to get a physical NIC to bind to." 41 exit 1 38 # Failed to get a currently active NIC, get the first available NIC. 39 phys_nic=`/usr/sbin/dladm show-link | /usr/bin/nawk '/legacy/ {next} {print $1; exit}'` 40 if [ -z "$phys_nic" ]; then 41 # Failed to get any NICs! 42 echo "Failed to get a physical NIC to bind to." 43 exit 1 44 fi 42 45 fi 43 46 fi 44 47 45 48 # To use a specific physical NIC, replace $phys_nic with the name of the NIC. 46 vnic_name= "vnic"`/usr/lib/vna $phys_nic $mac`49 vnic_name=`/usr/lib/vna $phys_nic $mac` 47 50 if [ $? != 0 ]; then 48 51 exit 1 49 52 fi 53 54 # The vna utility can return the id/name depending on the distro 55 case "$vnic_name" in 56 vnic[0-9]*) 57 vnic_name="$vnic_name" 58 ;; 59 *) 60 vnic_name="vnic$vnic_name" 61 ;; 62 esac 50 63 else 51 64 vnic_name=$2
Note:
See TracChangeset
for help on using the changeset viewer.