core: 提前删除 resolv.conf
This commit is contained in:
parent
2f575eddc1
commit
ca348ce45b
5
trans.sh
5
trans.sh
@ -1179,7 +1179,6 @@ install_qcow_el() {
|
|||||||
create_swap /installer/swapfile
|
create_swap /installer/swapfile
|
||||||
|
|
||||||
# resolv.conf
|
# resolv.conf
|
||||||
mv /os/etc/resolv.conf /os/etc/resolv.conf.orig
|
|
||||||
cp /etc/resolv.conf /os/etc/resolv.conf
|
cp /etc/resolv.conf /os/etc/resolv.conf
|
||||||
|
|
||||||
# selinux kdump
|
# selinux kdump
|
||||||
@ -1269,8 +1268,8 @@ EOF
|
|||||||
chroot /os/ grub2-mkconfig -o /boot/grub2/grub.cfg
|
chroot /os/ grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 还原 resolv.conf
|
# 不删除可能网络管理器不会写入dns
|
||||||
mv /os/etc/resolv.conf.orig /os/etc/resolv.conf
|
rm -f /os/etc/resolv.conf
|
||||||
|
|
||||||
# 删除installer分区,重启后cloud init会自动扩容
|
# 删除installer分区,重启后cloud init会自动扩容
|
||||||
swapoff -a
|
swapoff -a
|
||||||
|
Loading…
Reference in New Issue
Block a user