core: 修复从 Windows 下获取的 IP 含有多余的换行符
This commit is contained in:
parent
2a7c24bee4
commit
ce7a4812a2
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user