Update install_pve.sh

This commit is contained in:
spiritlhl 2023-08-04 13:03:28 +08:00 committed by GitHub
parent 975af208c4
commit 3674b642c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
#!/bin/bash
# from
# https://github.com/spiritLHLS/pve
# 2023.08.03
# 2023.08.04
########## 预设部分输出和部分中间变量
@ -790,7 +790,7 @@ if [ ! -f /usr/local/bin/pve_ipv6_prefixlen ]; then
echo "$ipv6_prefixlen" > /usr/local/bin/pve_ipv6_prefixlen
fi
if [ ! -f /usr/local/bin/pve_ipv6_gateway ]; then
ipv6_gateway=$(ip -6 route show | awk '/default via/{print $3}')
ipv6_gateway=$(ip -6 route show | awk '/default via/{print $3}' | head -n 1)
echo "$ipv6_gateway" > /usr/local/bin/pve_ipv6_gateway
fi
ipv6_address=$(cat /usr/local/bin/pve_check_ipv6)
@ -1236,4 +1236,4 @@ _green "用户名、密码就是服务器所使用的用户名、密码(如root
_green "如果登录无误请不要急着重启系统,去执行预配置环境的命令后再重启系统"
_green "如果登录有问题web端没起来等待10秒后重启系统看看"
rm -rf /usr/local/bin/reboot_pve.txt
rm -rf /usr/local/bin/ifupdown2_installed.txt
rm -rf /usr/local/bin/ifupdown2_installed.txt