mirror of
https://github.com/bin456789/reinstall.git
synced 2025-06-17 17:59:58 +00:00
core: initrd 阶段等待网卡启动
This commit is contained in:
parent
d7540ff59c
commit
2a8e760b97
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[](https://app.codacy.com/gh/bin456789/reinstall/dashboard)
|
[](https://app.codacy.com/gh/bin456789/reinstall/dashboard)
|
||||||
[](https://www.codefactor.io/repository/github/bin456789/reinstall)
|
[](https://www.codefactor.io/repository/github/bin456789/reinstall)
|
||||||
[](https://github.com/XAMPPRocky/tokei)
|
[](https://github.com/XAMPPRocky/tokei_rs)
|
||||||
[](https://t.me/reinstall_os)
|
[](https://t.me/reinstall_os)
|
||||||
[](https://github.com/sponsors/bin456789)
|
[](https://github.com/sponsors/bin456789)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[](https://app.codacy.com/gh/bin456789/reinstall/dashboard)
|
[](https://app.codacy.com/gh/bin456789/reinstall/dashboard)
|
||||||
[](https://www.codefactor.io/repository/github/bin456789/reinstall)
|
[](https://www.codefactor.io/repository/github/bin456789/reinstall)
|
||||||
[](https://github.com/XAMPPRocky/tokei)
|
[](https://github.com/XAMPPRocky/tokei_rs)
|
||||||
[](https://t.me/reinstall_os)
|
[](https://t.me/reinstall_os)
|
||||||
[](https://github.com/sponsors/bin456789)
|
[](https://github.com/sponsors/bin456789)
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@ get_ethx() {
|
|||||||
# 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000\ link/ether 60:45:bd:21:8a:51 brd ff:ff:ff:ff:ff:ff
|
# 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000\ link/ether 60:45:bd:21:8a:51 brd ff:ff:ff:ff:ff:ff
|
||||||
# 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP800> mtu 1500 qdisc mq master eth0 state UP qlen 1000\ link/ether 60:45:bd:21:8a:51 brd ff:ff:ff
|
# 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP800> mtu 1500 qdisc mq master eth0 state UP qlen 1000\ link/ether 60:45:bd:21:8a:51 brd ff:ff:ff
|
||||||
if false; then
|
if false; then
|
||||||
ip -o link | grep -i "$mac_addr" | grep -v master | awk '{print $2}' | cut -d: -f1
|
ip -o link | grep -i "$mac_addr" | grep -v master | awk '{print $2}' | cut -d: -f1 | grep .
|
||||||
else
|
else
|
||||||
ip -o link | grep -i "$mac_addr" | grep -v master | cut -d' ' -f2 | cut -d: -f1
|
ip -o link | grep -i "$mac_addr" | grep -v master | cut -d' ' -f2 | cut -d: -f1 | grep .
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,7 +274,13 @@ flush_ipv6_config() {
|
|||||||
ip -6 route flush dev "$ethx"
|
ip -6 route flush dev "$ethx"
|
||||||
}
|
}
|
||||||
|
|
||||||
ethx=$(get_ethx)
|
for i in $(seq 20); do
|
||||||
|
if ethx=$(get_ethx); then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
if [ -z "$ethx" ]; then
|
if [ -z "$ethx" ]; then
|
||||||
echo "Not found network card: $mac_addr"
|
echo "Not found network card: $mac_addr"
|
||||||
exit
|
exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user