File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -559,15 +559,16 @@ if [ "${vnet}" = "1" ]; then
559
559
esac
560
560
561
561
case "${tmp_iface}" in
562
- epair *)
563
- nic_type="epair "
562
+ ppt_ *)
563
+ nic_type="ppt "
564
564
;;
565
565
*)
566
- nic_type="ppt "
566
+ nic_type="epair "
567
567
;;
568
568
esac
569
569
570
570
unset tmp_type tmp_type
571
+ #echo "NIC TYPE [$i]: ${nic_type}"
571
572
572
573
nic_hwaddr=
573
574
nic_parent=
@@ -651,7 +652,7 @@ if [ "${vnet}" = "1" ]; then
651
652
${distdir}/tools/vale-ctl -h vale${valeid}:${myepair}a
652
653
esac
653
654
654
- printf "${H3_COLOR}${myepair}:${N2_COLOR}${nic_parent} "
655
+ printf "${H3_COLOR}${myepair}(type:${nic_type}) :${N2_COLOR}${nic_parent} "
655
656
656
657
case "${nic_type}" in
657
658
ppt)
@@ -683,13 +684,16 @@ if [ "${vnet}" = "1" ]; then
683
684
cbsdsqlrw ${jailsysdir}/${jname}/local.sqlite "UPDATE jailnic SET nic_hwaddr='${nic_hwaddr}' WHERE name='${i}'"
684
685
fi
685
686
687
+ _iface_rename=0
688
+
686
689
case "${nic_type}" in
687
690
ppt)
688
691
cbsdlogger NOTICE ${CBSD_APP}: jail ${jname}: set hwaddr for vnet interface ${myepair}: ${nic_hwaddr}
689
692
${IFCONFIG_CMD} ${myepair} ether ${nic_hwaddr}
690
693
;;
691
694
*)
692
695
cbsdlogger NOTICE ${CBSD_APP}: jail ${jname}: set hwaddr for vnet interface ${myepair}b: ${nic_hwaddr}
696
+ _iface_rename=1
693
697
${IFCONFIG_CMD} ${myepair}b ether ${nic_hwaddr}
694
698
if [ "${nic_address}" != "0" ]; then
695
699
${IFCONFIG_CMD} ${myepair}a inet ${nic_address} up
@@ -928,7 +932,7 @@ if [ ${vnet} -eq 1 ]; then
928
932
${IFCONFIG_CMD} ${i} up
929
933
# we need setup lock here due to ethX name possible conflict with other jail
930
934
_wait_count=0
931
- _iface_rename=0
935
+ [ -z "${_iface_rename}" ] && _iface_rename=0
932
936
933
937
if [ ${_iface_rename} -eq 1 ]; then
934
938
while [ -r ${tmpdir}/eth${eth_seq}.locked ]; do
You can’t perform that action at this time.
0 commit comments