mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-31 10:58:06 +08:00
core: 不重要的优化
This commit is contained in:
parent
4952dead76
commit
307d21ec4b
@ -102,9 +102,11 @@ echo 'Testing Internet Connection...'
|
|||||||
for i in $(seq 5); do
|
for i in $(seq 5); do
|
||||||
{
|
{
|
||||||
if is_need_test_ipv4 && nslookup www.qq.com $ipv4_dns1; then
|
if is_need_test_ipv4 && nslookup www.qq.com $ipv4_dns1; then
|
||||||
|
echo "IPv4 has internet."
|
||||||
ipv4_has_internet=true
|
ipv4_has_internet=true
|
||||||
fi
|
fi
|
||||||
if is_need_test_ipv6 && nslookup www.qq.com $ipv6_dns1; then
|
if is_need_test_ipv6 && nslookup www.qq.com $ipv6_dns1; then
|
||||||
|
echo "IPv6 has internet."
|
||||||
ipv6_has_internet=true
|
ipv6_has_internet=true
|
||||||
fi
|
fi
|
||||||
if ! is_need_test_ipv4 && ! is_need_test_ipv6; then
|
if ! is_need_test_ipv4 && ! is_need_test_ipv6; then
|
||||||
|
@ -13,7 +13,7 @@ cd /d %~dp0
|
|||||||
openfiles 1>nul 2>&1
|
openfiles 1>nul 2>&1
|
||||||
if not !errorlevel! == 0 (
|
if not !errorlevel! == 0 (
|
||||||
echo Please run as administrator^^!
|
echo Please run as administrator^^!
|
||||||
exit 1
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
:: 检查是否国内
|
:: 检查是否国内
|
||||||
@ -59,7 +59,7 @@ if not exist !tags! (
|
|||||||
--root %SystemDrive%\cygwin^
|
--root %SystemDrive%\cygwin^
|
||||||
--local-package-dir %tmp%\cygwin-local-package-dir^
|
--local-package-dir %tmp%\cygwin-local-package-dir^
|
||||||
--packages !pkgs!^
|
--packages !pkgs!^
|
||||||
&& echo >!tags!
|
&& type nul >!tags!
|
||||||
)
|
)
|
||||||
|
|
||||||
:: 下载 reinstall.sh
|
:: 下载 reinstall.sh
|
||||||
|
11
trans.sh
11
trans.sh
@ -248,6 +248,13 @@ get_ra_to() {
|
|||||||
echo "Gathering network info..."
|
echo "Gathering network info..."
|
||||||
_ra="$(rdisc6 -1 eth0)"
|
_ra="$(rdisc6 -1 eth0)"
|
||||||
apk del ndisc6
|
apk del ndisc6
|
||||||
|
|
||||||
|
# 显示网络配置
|
||||||
|
echo
|
||||||
|
echo "$_ra" | cat -n
|
||||||
|
echo
|
||||||
|
ip addr | cat -n
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
eval "$1='$_ra'"
|
eval "$1='$_ra'"
|
||||||
}
|
}
|
||||||
@ -552,10 +559,6 @@ EOF
|
|||||||
|
|
||||||
# 显示网络配置
|
# 显示网络配置
|
||||||
echo
|
echo
|
||||||
ip addr | cat -n
|
|
||||||
echo
|
|
||||||
echo "$ra" | cat -n
|
|
||||||
echo
|
|
||||||
cat -n /etc/network/interfaces
|
cat -n /etc/network/interfaces
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user