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

This commit is contained in:
bin456789
2023-10-08 22:01:34 +08:00
parent 2a7c24bee4
commit ce7a4812a2

View File

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