Update install_pve.sh

This commit is contained in:
spiritlhl 2023-09-16 22:25:10 +08:00 committed by GitHub
parent a9a180dc7e
commit 343d62744d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1262,7 +1262,7 @@ if [ "$system_arch" = "x86" ]; then
fi
# 确保DNS有效
if [ ! -s "/etc/resolv.conf" ]; then
if [ ! -s "/etc/resolv.conf" ] || [ -z "$(grep -vE '^\s*#' /etc/resolv.conf)" ]; then
cp /etc/resolv.conf /etc/resolv.conf.bak
if [[ "${CN}" == true ]]; then
if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ]; then