Skip to content

Commit

Permalink
centos: 修复 /etc/default/grub 格式错误
Browse files Browse the repository at this point in the history
fixes #141
  • Loading branch information
bin456789 committed Sep 6, 2024
1 parent 5e8ecb4 commit 5b133fe
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion trans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,6 @@ disable_selinux_kdump() {
# yum reinstall kernel-core # 重新安装新内核
# cat /boot/loader/entries/* # 依然有 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M

sed -i 's/crashkernel=[^ ]*/crashkernel=no/' $os_dir/etc/default/grub
chroot $os_dir grubby --update-kernel ALL --args crashkernel=no
# el7 上面那条 grubby 命令不能设置 /etc/default/grub
sed -i 's/crashkernel=[^ "]*/crashkernel=no/' $os_dir/etc/default/grub
Expand Down

0 comments on commit 5b133fe

Please sign in to comment.