core: 修复从 Windows 下获取的 IP 含有多余的换行符

This commit is contained in:
bin456789 2023-10-08 22:01:34 +08:00
parent 2a7c24bee4
commit ce7a4812a2
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -726,7 +726,8 @@ collect_netconf() {
powershell -nologo -noprofile -NonInteractive \ powershell -nologo -noprofile -NonInteractive \
-ExecutionPolicy bypass \ -ExecutionPolicy bypass \
-File "$ps1" | -File "$ps1" |
sed 's/://' sed 's/://' |
sed 's/\r//' # 删除 windows \r 换行符
) )
mac_addr=$(echo_conf MACAddress) mac_addr=$(echo_conf MACAddress)
ipv4_addr=$(echo_conf IPAddress4) ipv4_addr=$(echo_conf IPAddress4)