mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
core: 对云镜像手动删除 machine-id
This commit is contained in:
parent
58ff5f69f2
commit
27606cf239
11
trans.sh
11
trans.sh
@ -892,6 +892,12 @@ create_cloud_init_network_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
truncate_machine_id() {
|
||||
os_dir=$1
|
||||
|
||||
truncate -s 0 $os_dir/etc/machine-id
|
||||
}
|
||||
|
||||
download_cloud_init_config() {
|
||||
os_dir=$1
|
||||
|
||||
@ -1031,6 +1037,8 @@ modify_linux() {
|
||||
|
||||
download_cloud_init_config $os_dir
|
||||
|
||||
truncate_machine_id $os_dir
|
||||
|
||||
# 为红帽系禁用 selinux kdump
|
||||
if [ -f $os_dir/etc/redhat-release ]; then
|
||||
find_and_mount /boot
|
||||
@ -1284,6 +1292,9 @@ install_qcow_el() {
|
||||
# cloud-init
|
||||
download_cloud_init_config /os
|
||||
|
||||
# 部分镜像例如 centos7 要手动删除 machine-id
|
||||
truncate_machine_id /os
|
||||
|
||||
# 为 centos 7 ci 安装 NetworkManager
|
||||
# 1. 能够自动配置 onlink 网关
|
||||
# 2. 解决 cloud-init 关闭了 ra,因为 nm 无视内核 ra 设置
|
||||
|
Loading…
x
Reference in New Issue
Block a user