From ca348ce45b9237fafe90cfc01374292792b2c984 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 27 Oct 2023 12:03:47 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=8F=90=E5=89=8D=E5=88=A0=E9=99=A4=20?= =?UTF-8?q?resolv.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trans.sh b/trans.sh index e4f429e..9fcacb8 100644 --- a/trans.sh +++ b/trans.sh @@ -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