redhat: 修复用云镜像安装 fedara 时,启动项没禁用 selinux 和 crashkernel

This commit is contained in:
bin456789 2023-08-06 22:16:27 +08:00
parent f980d5448c
commit 1f648fceb3
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -449,6 +449,15 @@ EOF
}
modify_dd_os() {
find_and_mount() {
mount_point=$1
mount_dev=$(awk "\$2==\"$mount_point\" {print \$1}" $os_dir/etc/fstab)
if [ -n "$mount_dev" ]; then
mount $mount_dev $os_dir$mount_point
fi
}
apk add lsblk
mkdir -p /os
# 按分区容量大到小,依次寻找系统分区
@ -470,10 +479,10 @@ modify_dd_os() {
download_cloud_init_config $os_dir
if [ -f $os_dir/etc/redhat-release ]; then
find_and_mount /boot
find_and_mount /boot/efi
disable_selinux_kdump $os_dir
fi
umount /os
}
install_cloud_image_by_dd() {