From c0e44234348db4a354793d7ee3a1156fc7e4c59c Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 25 Oct 2023 14:19:24 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=B8=BA=20centos=207=20=E4=BA=91?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=AE=89=E8=A3=85=20NetworkManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trans.sh b/trans.sh index 21dbcf9..929de98 100644 --- a/trans.sh +++ b/trans.sh @@ -1216,6 +1216,14 @@ install_qcow_el() { # cloud-init download_cloud_init_config /os + # 为 centos 7 ci 安装 NetworkManager + # 1. 能够自动配置 onlink 网关 + # 2. 解决 cloud-init 关闭了 ra,因为 nm 无视内核 ra 设置 + if grep 'centos:7' /os/etc/system-release-cpe; then + yum install -y NetworkManager + chroot /os/ systemctl enable NetworkManager + fi + # fstab 删除 boot 分区 # alma/rocky 镜像本身有boot分区,但我们不需要 sed -i '/[[:blank:]]\/boot[[:blank:]]/d' /os/etc/fstab