Skip to content

Commit

Permalink
linux: 不处理镜像里的 machine-id 文件
Browse files Browse the repository at this point in the history
  • Loading branch information
bin456789 committed Oct 23, 2024
1 parent 3f12bfd commit 7f6a6ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2242,6 +2242,7 @@ create_cloud_init_network_config() {
}

# 实测没用,生成的 machine-id 是固定的
# 而且 lightsail centos 9 模板 machine-id 也是相同的,显然相同 id 不是个问题
clear_machine_id() {
os_dir=$1

Expand Down Expand Up @@ -2526,7 +2527,7 @@ EOF

download_cloud_init_config $os_dir

clear_machine_id $os_dir
# clear_machine_id $os_dir

# el/ol/fedora/国产fork
# 1. 禁用 selinux kdump
Expand Down Expand Up @@ -3293,7 +3294,7 @@ install_qcow_by_copy() {
disable_selinux_kdump /os

# centos7 删除 machine-id 后不会自动重建
clear_machine_id /os
# clear_machine_id /os

# el7 yum 可能会使用 ipv6,即使没有 ipv6 网络
if [ "$releasever" = 7 ]; then
Expand Down

0 comments on commit 7f6a6ea

Please sign in to comment.