summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/brand/joyent/zone/statechange.ksh8
-rwxr-xr-xusr/src/lib/brand/kvm/zone/statechange.ksh8
2 files changed, 16 insertions, 0 deletions
diff --git a/usr/src/lib/brand/joyent/zone/statechange.ksh b/usr/src/lib/brand/joyent/zone/statechange.ksh
index 7d7d0213a4..ba4df02b99 100644
--- a/usr/src/lib/brand/joyent/zone/statechange.ksh
+++ b/usr/src/lib/brand/joyent/zone/statechange.ksh
@@ -142,6 +142,14 @@ setup_net()
orig_global=$global_nic
global_nic=$(eval echo \$SYSINFO_NIC_${orig_global})
+ # If the global nic is specified as a device or etherstub name
+ # rather than a tag
+ if [[ -z $global_nic ]]; then
+ echo "$(dladm show-phys -p -o LINK) $(dladm show-etherstub -p -o LINK)" \
+ | egrep "(^| )${orig_global}( |$)" > /dev/null
+ (( $? == 0 )) && global_nic=${orig_global}
+ fi
+
# For backwards compatibility with the other parts of the
# system, check if this zone already has this vnic setup.
# If so, move on to the next vnic.
diff --git a/usr/src/lib/brand/kvm/zone/statechange.ksh b/usr/src/lib/brand/kvm/zone/statechange.ksh
index 6efe6f3cb5..7c08ce6ea9 100755
--- a/usr/src/lib/brand/kvm/zone/statechange.ksh
+++ b/usr/src/lib/brand/kvm/zone/statechange.ksh
@@ -115,6 +115,14 @@ setup_net()
orig_global=$global_nic
global_nic=$(eval echo \$SYSINFO_NIC_${orig_global})
+ # If the global nic is specified as a device or etherstub name
+ # rather than a tag
+ if [[ -z $global_nic ]]; then
+ echo "$(dladm show-phys -p -o LINK) $(dladm show-etherstub -p -o LINK)" \
+ | egrep "(^| )${orig_global}( |$)" > /dev/null
+ (( $? == 0 )) && global_nic=${orig_global}
+ fi
+
# For backwards compatibility with the other parts of the
# system, check if this zone already has this vnic setup.
# If so, move on to the next vnic.