core: 提前删除 resolv.conf

This commit is contained in:
bin456789 2023-10-27 12:03:47 +08:00
parent 2f575eddc1
commit ca348ce45b
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -1179,7 +1179,6 @@ install_qcow_el() {
create_swap /installer/swapfile
# resolv.conf
mv /os/etc/resolv.conf /os/etc/resolv.conf.orig
cp /etc/resolv.conf /os/etc/resolv.conf
# selinux kdump
@ -1269,8 +1268,8 @@ EOF
chroot /os/ grub2-mkconfig -o /boot/grub2/grub.cfg
fi
# 还原 resolv.conf
mv /os/etc/resolv.conf.orig /os/etc/resolv.conf
# 不删除可能网络管理器不会写入dns
rm -f /os/etc/resolv.conf
# 删除installer分区重启后cloud init会自动扩容
swapoff -a