mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 修复国内机器误判为 IPv6 不通
原因是用了 ping dnspod 公共 IPv6 DNS 作为连通性检测 但是这个 DNS 禁 ping
This commit is contained in:
parent
49420773dd
commit
665f976a87
@ -151,7 +151,7 @@ bash reinstall.sh centos 9
|
|||||||
|
|
||||||
### Feature 2: DD
|
### Feature 2: DD
|
||||||
|
|
||||||
- Supports `raw` `vhd` `gzip` and `xz` formatted images
|
- Supports `raw`, `vhd`, `gzip` and `xz` formatted images
|
||||||
- When using DD with a Windows image, the script will automatically expand the system partition. For static IP machines, the IP will be configured automatically, and it may take a few minutes to take effect on first boot
|
- When using DD with a Windows image, the script will automatically expand the system partition. For static IP machines, the IP will be configured automatically, and it may take a few minutes to take effect on first boot
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -151,7 +151,7 @@ bash reinstall.sh centos 9
|
|||||||
|
|
||||||
### 功能 2: DD
|
### 功能 2: DD
|
||||||
|
|
||||||
- 支持 `raw` `vhd` `gzip`、`xz` 格式的镜像
|
- 支持 `raw`、`vhd`、`gzip`、`xz` 格式的镜像
|
||||||
- DD Windows 镜像时,会自动扩展系统盘。静态的机器会自动配置好 IP,可能首次开机几分钟后才生效
|
- DD Windows 镜像时,会自动扩展系统盘。静态的机器会自动配置好 IP,可能首次开机几分钟后才生效
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -10,10 +10,10 @@ ipv6_gateway=$5
|
|||||||
is_in_china=$6
|
is_in_china=$6
|
||||||
|
|
||||||
if $is_in_china; then
|
if $is_in_china; then
|
||||||
ipv4_dns1='119.29.29.29'
|
ipv4_dns1='223.5.5.5'
|
||||||
ipv4_dns2='223.5.5.5'
|
ipv4_dns2='119.29.29.29'
|
||||||
ipv6_dns1='2402:4e00::'
|
ipv6_dns1='2400:3200::1'
|
||||||
ipv6_dns2='2400:3200::1'
|
ipv6_dns2='2402:4e00::'
|
||||||
else
|
else
|
||||||
ipv4_dns1='1.1.1.1'
|
ipv4_dns1='1.1.1.1'
|
||||||
ipv4_dns2='8.8.8.8'
|
ipv4_dns2='8.8.8.8'
|
||||||
|
@ -247,8 +247,8 @@ test_url_real() {
|
|||||||
echo $url
|
echo $url
|
||||||
for i in $(seq 5 -1 0); do
|
for i in $(seq 5 -1 0); do
|
||||||
if command curl --insecure --connect-timeout 10 -Lfr 0-1048575 "$url" \
|
if command curl --insecure --connect-timeout 10 -Lfr 0-1048575 "$url" \
|
||||||
1> >(dd bs=1M count=1 of=$tmp_file iflag=fullblock 2>/dev/null) \
|
1> >(exec dd bs=1M count=1 of=$tmp_file iflag=fullblock 2>/dev/null) \
|
||||||
2> >(grep -v 'curl: (23)' >&2); then
|
2> >(exec grep -v 'curl: (23)' >&2); then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
ret=$?
|
ret=$?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user