From 5ce4929a9c6864fb3eca69682e839f2a37b20322 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 22 Dec 2023 23:26:57 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=20hyper-v=20=E8=99=9A=E6=8B=9F=E6=9C=BA?= =?UTF-8?q?=E7=9A=84=20IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reinstall.sh b/reinstall.sh index f380bff..5345f06 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -836,7 +836,7 @@ collect_netconf() { # 部分机器精简了 powershell # 所以不要用 powershell 获取网络信息 - ids=$(wmic nic where "PhysicalAdapter=true and MACAddress is not null and PNPDeviceID like '%VEN_%&DEV_%'" get InterfaceIndex | del_cr | sed '1d') + ids=$(wmic nic where "PhysicalAdapter=true and MACAddress is not null and (PNPDeviceID like '%VEN_%&DEV_%' or PNPDeviceID like '%{F8615163-DF3E-46C5-913F-F2D2F965ED0E}%')" get InterfaceIndex | del_cr | sed '1d') for id in $ids; do config=$(wmic nicconfig where "InterfaceIndex='$id'" get MACAddress,IPAddress,IPSubnet,DefaultIPGateway /format:list | del_cr) # 排除 IP/子网/网关为空的