VirtualBox

Ignore:
Timestamp:
Aug 1, 2008 4:09:17 PM (16 years ago)
Author:
vboxsync
Message:

Solaris/hostif: fixed vnic script for future nevada build where dladm format changes. Warning!! this isn't tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh

    r10222 r11067  
    3636    if [ $snv_num -le 82 ]; then
    3737        phys_nic=`/usr/sbin/dladm show-dev -p | /usr/bin/awk 'NF==4 && $2=="link=up" { print $1 }'`
     38    elif [ $snv_num -le 95 ]; then
     39        phys_field=`/usr/sbin/dladm show-link -p | /usr/bin/awk 'NF==5 && $4=="STATE=\"up\"" { print $1 }'`
     40        eval $phys_field
     41        phys_nic="$LINK"
    3842    else
    39         phys_field=`/usr/sbin/dladm show-link -p | /usr/bin/awk 'NF==5 && $4=="STATE=\"up\"" { print $1 }'`
     43        phys_field=`/usr/sbin/dladm show-link -p -o link,state | /usr/bin/awk 'BEGIN{FS=":"} /up/ {print $1}'`
    4044        eval $phys_field
    4145        phys_nic="$LINK"
     
    4650        if [ $snv_num -le 82 ]; then
    4751            phys_nic=`/usr/sbin/dladm show-link -p | /usr/bin/nawk '/legacy/ {next} {print $1; exit}'`
    48         else
     52        elif [ $snv_num -le 95 ]; then
    4953            phys_field=`/usr/sbin/dladm show-link -p | /usr/bin/awk 'NF==5 && $2=="CLASS=\"phys\"" { print $1 }'`
    5054            eval $phys_field
    5155            phys_nic="$LINK"
     56        else
     57            phys_field=`/usr/sbin/dladm show-link -p -o link,class | /usr/bin/awk 'BEGIN{FS=":"} /up/ {print $1}'`
     58            eval $phys_field
     59            phys_nic="$LINK"           
    5260        fi
    5361        if [ -z "$phys_nic" ]; then
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette