mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 15:37:43 +08:00
修复脚本无法获取部分移动云电脑的 IP
移动云电脑第一条默认路由是 VPN 网卡,其 MAC 为空,通过此特征进行排除
This commit is contained in:
@ -26,9 +26,9 @@ fi
|
||||
# debian 12 initrd 没有 xargs
|
||||
get_ethx() {
|
||||
if false; then
|
||||
ip -o link | grep "$mac_addr" | awk '{print $2}' | cut -d: -f1
|
||||
ip -o link | grep -i "$mac_addr" | awk '{print $2}' | cut -d: -f1
|
||||
else
|
||||
ip -o link | grep "$mac_addr" | cut -d' ' -f2 | cut -d: -f1
|
||||
ip -o link | grep -i "$mac_addr" | cut -d' ' -f2 | cut -d: -f1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user