ubuntu: 添加 dig 注释

This commit is contained in:
bin456789 2023-07-15 23:39:45 +08:00
parent ddcf55352f
commit 50ab8d2bd1
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -27,6 +27,7 @@ autoinstall:
# 禁用 DNS 强制离线安装内核和跳过最后的更新
# 但安装器会配置时区和写入最近的mirror到/etc/apt/sources.list 所以要提前解析
# dig会显示cname结果cname会以.结尾grep -v '\.$' 表示去除 cname 结果
echo $(dig +short geoip.ubuntu.com | grep -v '\.$' | head -1) geoip.ubuntu.com >>/etc/hosts
sed -i -E 's/(^nameserver )/#\1/' /etc/resolv.conf
late-commands: